Status: Verified (View Workflow)
Affects Version/s: 6.x.x
Fix Version/s: 7.1.0.GA
Component/s: jBPM Core
- BPM Suite 6.4.6
- BPM Suite 7 Beta 02
When obtaining parent process id inside ProcessEventListener, for example:
The returned value is 0 (in case our process does not have parent)
However, when obtaining parent process instance id over REST API, the result is -1
This discrepancy is caused because when using REST API, the value is taken from ProcessInstanceLog where its explicitly set to -1 in case of missing parent.
When using process event listener, the value seems to be taken from ProcessInstanceImpl where its not initialised in case of no parent, i.e.:
and the setter method is simply not called.
Customer would like to have these two values unified - i.e. -1 value in both - REST and listener.
I think this could be simply achieved by initialising the parent process instance id to default value -1, i.e.:
And if there is some parent, it would be of course overridden by calling appropriate setter.