Bug 1271247

Summary: Process instance variable log contains a single space instead of null value on Sybase
Product: [Retired] JBoss BPMS Platform 6 Reporter: Tomas Livora <tlivora>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED NOTABUG QA Contact: Tomas Livora <tlivora>
Severity: high Docs Contact: Tomas 'Sheldon' Radej <tradej>
Priority: medium    
Version: 6.2.0CC: kverlaen, tlivora, tradej
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 16:58:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Livora 2015-10-13 13:23:42 UTC
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 17:00:13 UTC
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 17:18:08 UTC
I think it can be closed then. However, we should add a note about this strange behavior of Sybase to our documentation.