Sunday, March 15, 2009

Pass Variables between Java & BPEL Process

When using Java embedding activity in a BPEL process for processing BPEL variables , it will be required to pass the variables between Java and the BPEL process. In such cases, you can use
the following methods to get/set the variables;

getVariableData(bpelVariable); method will fetch that variable value to be used inside the Java embedding activity

setVariableData(bpelVariable, Value); method sets the Value (processed in the Java embedding activity) to the bpelVariable, which can be used in the BPEL process for further processing.

However, the variable datatype conversions should be properly handled in BPEL process and Java embedding activity.

1 comment:

  1. You wrote "However, the variable datatype conversions should be properly handled in BPEL process and Java embedding activity". Could you please explain it more? Can you also show an example, say I want to store a Map(HashMap) of NV Pairs into a BPEL variable using setVariableData(...) and then reconstructing (um-marshaling) again using getVariableData(...). Thanks.

    ReplyDelete