开发者

How to use Array in Oracle's bpelx:exec BPEL extension

I have created a BPEL process in which there are two java Embed Activity.and we have on varibale(array type) at BPEL process level.

following is the array variable xsd.

<?xml version="1.0" encoding="UTF-8"?> 
<schema attributeFormDefault="unqualified"
    elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/RegistrationUpload_jws/RegistrationUpload"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="groupIDArray">
        <complexType>
            <sequence>
                <element name="groupId" type="string" maxOccurs="unbounded"/>      
            </sequence>
        </complexType>
    </element>
</schema>

My开发者_运维问答 requirement is I want to add variables in this array on Java Embed activity and then I will use the same filled array in next Java Embed activity.

Please suggest me some points. any sample code if possible please refer the link. Thanks


What's you problem, exactly?

  • Before calling Java Embedded, call getVariable(), which will give you the variable (array) as a DOM Element.
  • Pass it down to Java code.
  • Parse it there into a data structure (JAXB is best for it).
  • Add/remove/update elements as you wish.
  • Serialize the data structure back to DOM.
  • Return it from Java.
  • Call setVariable() to store the DOM back into the original variable.

You're done, the variable is updated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜