Bug 1271247 - Process instance variable log contains a single space instead of null value on Sybase
Process instance variable log contains a single space instead of null value o...
Status: CLOSED NOTABUG
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.2.0
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Maciej Swiderski
Tomas Livora
Tomas Radej
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-13 09:23 EDT by Tomas Livora
Modified: 2015-12-07 11:58 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When running JBoss BPM Suite with a Sybase database instance, querying a process variable that has a null value returns a single space character (" ") instead of null. This is a limitation of the Sybase database, and there is currently no workaround.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:58:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Livora 2015-10-13 09:23:42 EDT
Description of problem:
When you have a process instance with null process variable and you try to get its value while using Sybase database, you will get a single space character instead of null. Although it may not seem like a big deal when working with such value on the client side, imagine a process instance which contains check if the process variable is null (or empty). This condition will probably evaluate differently on Sybase than on other databases.

Version-Release number of selected component (if applicable):
6.2.0 ER3

Steps to Reproduce:
1. Run Business Central on Sybase database.
2. Run a business process with null variable.
3. Try to get this variable through REST API.

Actual results:
A single space is returned.

Expected results:
null value should be returned. The behavior should be the same regardless of which database is used.

Additional info:
This bug has been discovered using REST API but the problem is probably in the underlying jBPM engine.
Comment 1 Maciej Swiderski 2015-11-18 12:00:13 EST
while I see your point that it might be confusing I don't see anyway to solve it. Mainly because there could be the opposite situation you described - a process variable is single space value and then it is not possible to recognize if this is null or not. 

I am afraid that this is (yet another) limitation of sybase that does return weird values. Since we do not have control over data access (done via jpa) meaning we cannot decide if shall deal with single space somehow or not.

I opt at closing this as won't fix, thoughts?
Comment 2 Tomas Livora 2015-11-18 12:18:08 EST
I think it can be closed then. However, we should add a note about this strange behavior of Sybase to our documentation.

Note You need to log in before you can comment on or make changes to this bug.