Payload set by API but dataObject remains empty and data does not flow

Hi,
We used ADF to programatically set the payload of a new BPM Instance, using JDev 11.1.1.6 and our BPM is also 11.1.1.6. Followed standard documentation.. and payload gets set, and submitted.
firstTask.setPayloadAsElement(payload);
wfSvcClient_.getTaskService().updateTaskOutcome(ctx, firstTask, Utilities.INIT_TASK_SUBMIT_OUTCOME);
When we check in the BPMN for "exiting the initiator activity", we see payload set BUT dataObject with no elements set (empty):
<auditQueryPayload auditId="505000" ciKey="560017">
<serviceOutput>
<element name="execData" detailId="59246" isBusinessIndicator="false"> <value> <task xmlns="http://xmlns.oracle.com/bpel/workflow/task"> ...
<payload> <PurposeOfFiling xmlns="http://xmlns.oracle.com/OR1/OR1_FORMS_V2/PurposeOfFiling">
*<purOrganizationId>C078</purOrganizationId>*
</PurposeOfFiling> </payload>
..... </serviceOutput>
<dataState> <dataObject name="PurposeOfFiling" isBusinessIndicator="false"> <value>
<PurposeOfFiling xmlns="http://xmlns.oracle.com/bpm/bpmobject/BusinessObjects/PurposeOfFiling">
*<purOrganizationId></purOrganizationId>*
</value></dataObject></dataState>
</auditQueryPayload>
On entering the second activity (there is nothing between the first and second activity, i.e. direct link), the form comes up empty.
It appears that in "firstTask.setPayloadAsElement(payload);" the payload is getting set, but the dataObject is empty, and that the dataObject is what is feeding the second activity, and so that is empty.
Is there a way that we can ensure that the payload "feeds" the dataObject?
Or alternatively, that the payload "feeds" the second activity?
How would it be done? Would really appreciate any assistance.
Thanks!
Ali.

Thanks Bill.
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.
Thanks!

Similar Messages

Maybe you are looking for