This content has been marked as final. Show 3 replies
I have made some more progress in evaluation tests, and can provide more info./confirmation of the problem:
I added a SCRIPT TASK before the first Human Task, and this initialized/populated the <dataObject>
Now when the application is invoked, including the code:
wfSvcClient_.getTaskService().updateTaskOutcome(ctx, firstTask, Utilities.INIT_TASK_SUBMIT_OUTCOME);
The task payload for the first task gets set (just as before) with what we set programatically in it,
AND the dataObject gets set with the Initialization values from the SCRIPT-Task.
So this is a confirmation that the "setPayloadAsElement" is NOT setting the "dataObject".
Apparently there are two payloads : Task Payload and Data Payload.
Here is the conundrum that needs resolution:
"setPayloadAsElement" sets the Task Payload only, whereas it is the Data Payload that gets passed (from Activity to activity)!
So what is the point of the API setting the Task Payload, without the Data Payload, if it is the Data Payload that will be passed?
Is there a fix for this issue? Am I missing something?
Is there some way to set the Data Payload from the Task Payload?
or some API to set the Data Payload directly (because the "setPayloadAsElement" seems to only set the Task Payload)
or some way to link the Task Payload in Output to the Data Payload? (the execData Task Payload is not exposed so I cannot see how?)
I'd appreciate any help.
It was something that I had in an earlier build (when I was looking into payload updates) and had removed.. but I've gone ahead and put it back.
These are my results:
When the BPM Application Output is wired for dataObject -to- dataObject (which I think is the right way to do), then the dataObject still remains empty.
When the BPM Application Output is wired for UI -to- dataObject, then the Instance gets suspended due to uninitializedVariable.
When the BPM Application Output is not wired at all (and Input was never wired to begin with) then dataObject is missing all together.
One thing I noticed (on just trying the first activity by itself) is that the payload is shown in the UI (i.e. task Payload gets into UI). This was the effect of the "updateTask".
However, in case of programatic SUBMIT, the payload is still not passed to the next activity. This appears to be once again because the dataObject itself is not being set.
Also interestingly I found the below BUG request recently (3/22/2013) registered with Oracle, asking for APIs to be able to get/set the actual dataObject:
BUG 16537745 - ABILITY TO ACCESS PROCESS INSTANCE DATAOBJECT VALUES USING API --> Oracle Business Process Management Suite
- I don't have access to the details of it, but I'm guessing that their dataObject was not being set, and so API Access is requested to set it.
However, if there is an existing solution - whereby the dataObject payload can be set (besides the task Payload), I'd much appreciate.