BPEL Assign

Hi ..
I noticed the following assignment generates a warning; about a variable not being initialized - is it possible to tell which of the variables?
<assign name="Assign_1">
<copy>
<from expression="concat('Hello ', bpws:getVariableData('inputVariable','payload','/client:SayHelloProcessRequest/client:input'))"/>
<to variable="outputVariable" part="payload"
query="/client:SayHelloProcessResponse/client:result"/>
</copy>
<copy>
<from variable="outputVariable" part="payload"
query="/client:SayHelloProcessResponse/client:result"/>
<to variable="Invoke_1_Write_InputVariable" part="opaque"
query="/ns3:singleString/ns3:input"/>
</copy>
</assign>
Also... this does not generate the warning:
<assign name="Assign_1">
<copy>
<from expression="concat('Hello ', bpws:getVariableData('inputVariable','payload','/client:SayHelloProcessRequest/client:input'))"/>
<to variable="outputVariable" part="payload"
query="/client:SayHelloProcessResponse/client:result"/>
</copy>
</assign>
<assign name="Assign_2">
<copy>
<from variable="outputVariable" part="payload"
query="/client:SayHelloProcessResponse/client:result"/>
<to variable="Invoke_1_Write_InputVariable" part="opaque"
query="/ns3:singleString/ns3:input"/>
</copy>
</assign>
Regards

Hi All
Using this syntax made it work.
bpws:getVariableData('GetDistinct_CountDept_OutputVariable','CountDeptOutputCollection','/ns10:CountDeptOutputCollection/ns10:CountDeptOutput[bpws:getVariableData(&quot;DeptLoop&quot;)]/ns10:Department')
Thanks
Ish

Similar Messages

  • How to add XML attribute to an Element using BPEL assign

    I have a request xml to a bpel process that does not contain a attribute.
    After some process I need to create this missing attribute and set a value.
    I tried using the XML fragment in the Assign Activity. But how can I create a attribute?
    This XML node to which I am trying to create an attribute is a very huge node with lot of dynamic typing(xsi:type). I can just re-create the complete xml with required nodes.
    Does any one know how I can create a xml attribute using the BPEL assign? I do not want to use the Java code in my process.
    Thanks.

    I'm bit confused about what exact problem you are facing with attributes.
    You can check accessing XML attributes in BPEL Assign @ http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#BABIHDHI from the page http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm.
    I suppose your source input has no attributes and destination has to be an xml with attribute of type xsi:type. You can use the assign activity as mentioned in above document to assign your type structure to type attribute.

  • How to Use XPATH 2.0 in BPEL Assign/Transform

    Hi,
    I see a lot of Xpath 2.0 functions defined, http://www.w3schools.com/XPath/xpath_functions.asp .
    But I am not able to use most of them in Jdeveloper 11.1.1.3 BPEL Designer.
    Like I tried to use, xp20:distinct-values , xp20:reverse , x20:string-values etc but it is giving error.
    I can use very few xpath functions which are coming in the Assign/Transform activity drop down (during copy operations)
    strangely some Xpath functions do not come in any LOV but still are working fine like : position() , last() etc .
    How can I use other XPath functions? A list of existing Xpath functions are defined here : http://www.w3.org/TR/xpath-functions/
    Am I missing something ? how can I use all the in-built Xpath 2.0 functions in BPEL ?
    Please could you help.
    Thanks and Regards,
    Sudip

    I have tried that too , putting the namespace from Xpath20 in .bpel file , but still it is giving compilation error saying this is not registered.
    It seems SOA 11g BPEL only supports the xpath extension functions written in bpel-xpath-functions.xml file .
    And it does not support any other Xpath2.0 functions like 'distinct-values' 'reverse' etc.
    And there is no other way than writing custom Xpath functions for bpel 11g in order to get distinct-values of a nodeset etc ... are these conclusions correct?
    Please could anybody suggest?
    Thanks and Regards,
    Sudip

  • Line feeds in a BPEL assign activity as viewed in the BPM worklist

    We are catching errors in our BPEL 1.1 process (created in SOA Suite 11.1.1.6) and sending them to the BPM worklist via a human workflow. We followed the basic documentation found here:
    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/partpage_hwf.htm#CHDGICFI
    Before we invoke the call to human task, we assign some strings to parts of the message. For example:
    <assign>
    <copy>
    <from expression="Detailed message:\n\nMore details go here."/>
    <to>....
    When we pull up our error in the BPM worklist and view the detail page, we do not see "Detailed message" and "More details go here." separated by 2 line feeds. Instead, we see the actual text "\n\n" printed out.
    I have tried a variety of other line feeds, but nothing seems to work (i.e. to break up the text on the screen):
    &lt;br&gt; or &lt;br/&gt; - The tags show up in the detailed view. When I view the HTML source, I see it escaped them with &amplt; and &ampgt;
    &amp;lt;br&amp;gt; or &amp;lt;br/&amp;gt; - This exact text shows up on the screen (i.e. we see &amplt;, etc.)
    &amp;amp;lt;br&amp;amp;gt; or &amp;amp;lt;br/&amp;amp;gt; - Same result (i.e. we see &amplt;, etc.)
    &amp;#10; - The line break is visible in the HTML source, but that's just basic HTML whitespace which doesn't translate into a viewable line break
    &amp#xA; - Same thing with &amp;#10; Just HTML whitespace
    &lt;pre&gt; ... 2 carriage returns here &lt;/pre&gt; - I tried to trick it into forcing the HTML whitespace into actual line breaks, but I had the same issue with the &lt;br&gt; where the open/close brackets are always escaped or printed...but never interpreted.
    So...the big question is...what is the proper syntax to add line feeds that an HTML browser can interpret (while viewing the BPM worklist app) when I'm building that string in a BPEL &lt;assign&gt;&lt;copy&gt;&lt;from&gt; expression?
    Please advise,
    Michael

    Can you simply format your expression according to what you need an try? I mean replace
    <assign>
    <copy>
    <from expression="Detailed message:\n\nMore details go here."/>
    <to>....
    with
    <assign>
    <copy>
    <from expression="Detailed message:
    More details go here."/>
    <to>....
    Regards,
    Anuj

  • BPEL Assign Activity XPath failure

    Hi,
    My BPEL process fails during the Assign activity and it is failing because the Query expression does not find the 'from' element. Which makes sense because for one my test cases I am not including a value for that element in the XML instance. My question - How do I handle this situation such that when the 'from' element is either missing or has no value then nothing gets assigned to the target variable?
    ******* Error Message from BPEL PM Assign audit *****************
    [2009/05/14 21:37:45] Error in evaluate <from> expression at line "127". The result is empty for the XPath expression : "/ns2:CRMODAccounts/ns2:CRMODContactID".less
    oracle.xml.parser.v2.XMLElement@1a1d727
    [2009/05/14 21:37:45] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns2:CRMODAccounts/ns2:CRMODContactID" is empty at line 127, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns2:CRMODAccounts/ns2:CRMODContactID" is not empty.
    Possible reasons behind this problems are: some xml elements/attributes are optional or the xml data is invalid according to XML Schema.
    To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
    </summary>
    </part>
    </selectionFailure>
    *********************** section from bpel source for the assign function ****************
    <assign name="assignEBSAccountDetails">
    <copy>
    <from variable="inputVariable" part="payload"
    query="/ns2:CRMODAccounts/ns2:CRMODAccountID"/>
    <to variable="invokeEBSAccountDetails_GetEBSAccountDetailsPL_InputVariable"
    part="InputParameters"
    query="/ns3:InputParameters/ns3:P_CRMOD_ACCOUNT_ID"/>
    </copy>
    (versions) BPEL PM 10.1.3.4.0 JDev 10.1.3.4
    thanks,
    ilyas

    Use a switch, e.g. if string-lenght(/ns2:CRMODAccounts/ns2:CRMODContactID) > 0
    or you can do a transform and put an if condition for the mapping using the same code.
    cheers
    James

  • How to handle empty variable in BPEL Assign.

    Hello ,
    I am using SOA 11g R1
    I have created one Human task with task Details. Also i am assigning the Usercomments/task/comments to onw of my variable, but if I dont provide the comments from worklist comments section, and approves the task, My Assign is giving error as it is empty. So i want to know is there any function in BPEL which can handle Empty string.
    Thank you,
    Sandeep

    By using this type
    bpws:getVariableData('Invoke_DB_WorkOrderNumber_DB_WorkOrderNumber_OutputVariable','OutputParameters','/ns10:OutputParameters/ns10:P_Name')
    !=''
    also i cant give counts because before comparing accessing variable itself gives empty <message fault > error.
    I am still getting selection failure fault as my comments is empty (i..e I am not giving comments)
    does bpws:getVariableData() itself try to access the given parameter and populates empty error.?
    I tried
    bpws:getVariableData('AssigneeApprovalProcess_1_globalVariable','payload','/task:task/task:userComment/task:comment') !=''
    string-length(bpws:getVariableData('AssigneeApprovalProcess_1_globalVariable','payload','/task:task/task:userComment/task:comment') )>0
    but same error still.

  • BPEL Assign activityafter copying data, loosing namespace

    Hello Guys,
    in BPEL, using assign activity to copyList data from one payload to another payload, when i look the audit trail, namespace are missing, take an example.
    input:
    <inputVariable>
    <part  name="payload">
    <ns1:personsElement  manager="Manager Name">
         <ns1:person  ssn="SSN-123">
              <ns1:firstName>First Name - A</ns1:firstName>
              <ns1:lastName>LastName-B</ns1:lastName>
         </ns1:person>
         <ns1:person  ssn="SSN-2222">
              <ns1:firstName>First Name - BBB</ns1:firstName>
               <ns1:lastName>LastName-CCCC</ns1:lastName>
         </ns1:person>
    </ns1:personsElement>
    </part>
    </inputVariable>
    I'm getting out when i user assign
    <assign name="Assign1">
          <bpelx:copyList bpelx:ignoreMissingFromData="yes">
            <bpelx:from variable="inputVariable" part="payload"
                        query="/ns1:personsElement/ns1:person"/>
            <bpelx:to variable="outputVariable" part="payload"
                      query="/ns1:personsElement/ns1:person"/>
          </bpelx:copyList>
          <copy>
            <from variable="inputVariable" part="payload"
                  query="/ns1:personsElement/@manager"/>
            <to variable="outputVariable" part="payload"
                query="/ns1:personsElement/@manager"/>
          </copy>
        </assign>
    Output data:
    <outputVariable>
    <part  name="payload">
        <personsElement  manager="Manager Name">
            <ns1:person  ssn="SSN-123">
                <ns1:firstName>First Name - A</ns1:firstName>
                <ns1:lastName>LastName-B</ns1:lastName>
            </ns1:person>
            <ns1:person  ssn="SSN-2222">
                <ns1:firstName>First Name - BBB</ns1:firstName>
                <ns1:lastName>LastName-CCCC</ns1:lastName>
            </ns1:person>
        </personsElement>
    </part>
    </outputVariable>
    the namespace ns1: missing in personsElement node, please help me how to add namespace

    Hi,
    You are viewing this in "Audit Trail" on em console . Please view the same in "Flow" Tab. You will find the namespaces in Assign.
    Thanks,
    Richa.
    Mark it Correct(10 points)
    Mark it helpful(5 points)

  • BPEL assign count and node value from xml

    I have mapnames.xml in the project with nodes like this:
    <mapname>STATUS_DIMS_LOAD</mapname>
    <mapname>MOVEMENT_DIMS_LOAD</mapname>
    The xml of mapnames will be used for an input variable for a FlowN invoke.
    Trying to count the number of mapnames in the xml document and put in a variable.
    <assign name="getMapNamesN">
    <copy>
    <from expression= *"count(bpws:getVariableData('... ? " />*
    <to variable="FlowN_Dims_Count"/>
    </copy>
    </assign>
    Then use that in the FlowN
    <bpelx:flowN name="FlowN_Dims" N="bpws:getVariableData('Flow_Dims_Count')" indexVariable="Index">
    And then inside the FlowN, get the actual mapname using the index.
    <assign name="Assign_Dims">
    <copy>
    <from expression= *"bpws:getVariableData('... ? [',bwps:getVariableData('Index'),']') " />*
    <to variable="Invoke_Dims_InputVariable" part="InputParameters"
    query="/ns8:InputParameters/ns8:P_MAPNAME" />
    </copy>
    </assign>
    What is the syntax to
    1. Count the number of mapnames in the xml document?
    2. Use the FlowN index to assign the mapname to an input variable?

    That looked hopeful, but it did not show how to create the variables and I do not know the syntax for making an array variable.

  • SQL statements inside BPEL Assign-Copy

    Hi,
    I am trying to take the contents of a string variable and substring it using SQL statements such as 'substr', 'decode' and 'instr', then copying the output onto another variable (within an Assign/Copy operation) to eventually pass it on to a table (through a PartnerLink).
    Is there any way to do this?
    Or, are there any equivalent Text, "bpws:" commands I can use to perform the same task? (the ones I am finding under Expression Builder don't seem to be sufficient for what we're trying to do).
    Thank you for any help!
    ~~~~~~~~~~
    More specifically, I am trying to take this type of output (errors string):
    oracle.jdbc.driver.OracleSQLException: ORA-01400: cannot insert NULL into ("SFMFG"."SFPL_PLAN_EFF"."PLAN_ID")
         at oracle.jdbc.driver.T2SConnection.check_error(T2SConnection.java:153)
         at oracle.jdbc.driver.T2SPreparedStatement.checkError(T2SPreparedStatement.java:92)
         at oracle.jdbc.driver.T2SPreparedStatement.executeForRows(T2SPreparedStatement.java:449)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1294)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3514)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3620)
         at com.ibaset.usa.wid.dao.ReceiveWorkOrderDAO.addPlanEffectivity(ReceiveWorkOrderDAO.java:543)
         at com.ibaset.usa.wid.ReceiveWorkOrder.processInbound(ReceiveWorkOrder.java:47)
         at com.ibaset.usa.wid.ReceiveWorkOrder.processInbound(ReceiveWorkOrder.java:18)
    And run it through this substring statement to only get the ORA-... lines out of it:
    substr( error_message
    , 1, decode( instr(error_message, chr(10)||chr(10))
    , 0, decode( instr(error_message, chr(10) || 'ORA')
    , 0, length(error_message)
    , instr(error_message, chr(10) || 'ORA'))
    , instr(error_message, chr(10)||chr(10))))

    That looked hopeful, but it did not show how to create the variables and I do not know the syntax for making an array variable.

  • BPEL assign activity fault

    hi,
       Please anybody know how create human intervention recovery for sublanguageExecutionFault in assign activity.
       I assign xml file using ora:doc(file///) when file location is not correct.
       i am new for soa suite so please help.

    Hi,
    Its a Non Recoverable System Fault so you will not be able to recover it using human intervention..

  • Get All Element Values in Assign Activity

    Given the below XML, how can I get both values with a single statement?
    I tried /root/set/name/. with no luck. I would like to assign John Jane to a variable in a BPEL Assign Activity.
      <root>
        <set>
         <name>John</name>
        </set>
        <set>
         <name>Jane</name>
        </set>
      </root>

    If you want to select multiple nodes in an assign copy activity you will receive a selectionFailure. You can try this out by using /node/*[local-name() = 'nodename'] construct where * means all child elements and [local-name() = 'nodename'] represents the element name that needs to match.
    According to the BPEL Specification a selectionFailure MUST be thrown in the following situations:
    1. the from-spec selects multiple XML information items
    2. the from-spec selects one XML information item and the to-spec does not select exactly one XML information item.
    see BPEL Spec (section 8.4.1) http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html#_Toc164738498
    To have the desired result an assign activity with an expression can help. Use the concatenate function. See http://docs.oracle.com/cd/E28280_01/dev.1111/e10224/bp_manipdoc.htm#BABBHGAJ
    If you want to dynamically concatenate use a xslt transformation.
    Good luck!
    Melvin

  • How to pass a single element in an array to XSL from BPEL

    In a bpel (2.0) process I have a for-each loop iterating through a list in the original input document.  Within that loop I need to construct an  input document  for a call to a web service based on data in the current node of the list objects I am looping through.
    Constructing the input document via BPEL assign activity copies within the for-each loop is an option but due to the complexity of that document I would prefer to use XSL.  But I don't know how to pass the index information (ie. the for-each counter) into XSL and use it there (and I would prefer not to have to do so, since that will prevent use of the XSL GUI in jdev), so I would prefer to send  the current node of the list as input to XSL instead.
    Is it possible to pass a sub-section of an XML document (e.g. one node in the array) as input into XSL rather than the whole document?  In other words, I would like to send the current array element from the original input document rather than the entire original input document because I will be using the data within that array element to create the web service input document.
    Example:
    <forEach parallel="no" counterName="i"
                         name="ForEachEntry">
                  <startCounterValue>1</startCounterValue>
                  <finalCounterValue>$numTimeEntries</finalCounterValue>
    If I used the BPEL assign activity to populate the input document I would need lots of copies similar to this:
                  <copy>
                      <from>$inputVariable.OteStgTimecardCollection/ns3:OteStgTimecard[1]/ns3:oteStgTimecardDetailCollection/ns3:OteStgTimecardDetail[$i]/ns3:origtransactionreference</from>
                      <to>$InvokeOteDetailAbsenceErrorStatusService_OteAbsenceDetailFailureService_InputVariable.OteAbsenceDetailFailureServiceInput_msg/ns19:OrigTransactionReference</to>
                  </copy>
    I would prefer to send the current list object as an input variable into an XSL transform: 
         $inputVariable.OteStgTimecardCollection/ns3:OteStgTimecard[1]/ns3:oteStgTimecardDetailCollection/ns3:OteStgTimecardDetail[$i]
    Is there syntax in bpel that would do that?
    Thanks

    You need use While Element and use Array like Element[number]
    With While element you iterate <employee> node
    and with Element[number] you can extract information from that node.
    I wrote a BPEL that scan a XML file, the input is:
    <cliente>
            <codigo>01</codigo>
            <nombre>Deiby Mauricio Gomez</nombre>
                    <productos>
                            <producto>
                                    <nombre>Camisa Polo</nombre>
                                    <precio>50</precio>
                            </producto>
                            <producto>
                                    <nombre>Pantalon Lona</nombre>
                                    <precio>100</precio>
                            </producto>
                    </productos>
            </cliente>
            <cliente>
            <codigo>02</codigo>
            <nombre>Julio Cesar Ayapan</nombre>
                    <productos>
                            <producto>
                                    <nombre>Camisa Polo</nombre>
                                    <precio>50</precio>
                            </producto>
                    </productos>
            </cliente>
    In my BPEL I added up all article prices and after that I write to txt file the client and the Total.
    Example:
    Deiby Gomez, 150
    Cesar Ayapan, 50
    My while element is this (Please pay attention in bold words):
      <while name="While1"
               condition="bpws:getVariableData('variable1')&lt;=count(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente'))">
          <sequence>
            <assign name="Assign1">
              <copy>
                <from expression="sum(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:productos/ns4:producto/ns4:precio'))"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:cantidad"/>
              </copy>
              <copy>
                <from variable="Receive1_input_files" part="body"
                      query='/ns4:clientes/ns4:cliente[number(bpws:getVariableData("variable1"))]/ns4:codigo'/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:id"/>
              </copy>
            </assign>
            <invoke name="Invoke1" inputVariable="Invoke1_process_InputVariable"
                    outputVariable="Invoke1_process_OutputVariable"
                    partnerLink="ValidacionBancos2WS" portType="ns5:BPELProcess1"
                    operation="process" bpelx:invokeAsDetail="no"/>
            <switch name="Switch1">
              <case condition="bpws:getVariableData('Invoke1_process_OutputVariable','payload','/ns5:processResponse/ns5:resultado')='true'">
                <bpelx:annotation>
                  <bpelx:pattern>Si el cliente es aprobado</bpelx:pattern>
                  <bpelx:general>
                    <bpelx:property name="userLabel">Si Aprobado</bpelx:property>
                  </bpelx:general>
                </bpelx:annotation>
                <sequence>
                  <assign name="Assign4">
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query='/ns4:clientes/ns4:cliente[number(bpws:getVariableData("variable1"))]/ns4:codigo'/>
                      <to variable="Approved_Write_input" part="body"
                          query="/ns7:clientes/ns7:cliente/ns7:id"/>
                    </copy>
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query="/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:nombre"/>
                      <to variable="Approved_Write_input" part="body"
                          query="/ns7:clientes/ns7:cliente/ns7:nombre"/>
                    </copy>
                    <copy>
                      <from expression="sum(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:productos/ns4:producto/ns4:precio'))"/>
                      <to variable="Approved_Write_input" part="body"
                          query="/ns7:clientes/ns7:cliente/ns7:total"/>
                    </copy>
                  </assign>
                  <invoke name="Invoke2" inputVariable="Approved_Write_input"
                          partnerLink="fileAdapterWriteApproved"
                          portType="ns6:Write_ptt" operation="Write"
                          bpelx:invokeAsDetail="no"/>
                </sequence>
              </case>
              <otherwise>
                <sequence name="Sequence1">
                  <assign name="Assign5">
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query='/ns4:clientes/ns4:cliente[number(bpws:getVariableData("variable1"))]/ns4:codigo'/>
                      <to variable="Rechazados_Write_input" part="body"
                          query="/ns9:clientes/ns9:cliente/ns9:id"/>
                    </copy>
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query="/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:nombre"/>
                      <to variable="Rechazados_Write_input" part="body"
                          query="/ns9:clientes/ns9:cliente/ns9:nombre"/>
                    </copy>
                    <copy>
                      <from expression="sum(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:productos/ns4:producto/ns4:precio'))"/>
                      <to variable="Rechazados_Write_input" part="body"
                          query="/ns9:clientes/ns9:cliente/ns9:total"/>
                    </copy>
                  </assign>
                  <invoke name="Invoke3"
                          inputVariable="Rechazados_Write_input"
                          partnerLink="fileAdapterWriteRechazados"
                          portType="ns8:Write_ptt" operation="Write"
                          bpelx:invokeAsDetail="no"/>
                </sequence>
              </otherwise>
            </switch>
            <assign name="Assign2">
              <copy>
                <from expression="''"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:id"/>
              </copy>
              <copy>
                <from expression="bpws:getVariableData('variable1')+1"/>
                <to variable="variable1"/>
              </copy>
              <copy>
                <from expression="''"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:cantidad"/>
              </copy>
            </assign>
          </sequence>
        </while>

  • How to put data into a array element in the BPEL

    Hi,
    I have a element in the WSDL which is of type Array. (i.e accepts unlimited data for the same element). How should i put a data into a array in the BPEL.
    Example:
    The below Example gives u an idea about wht iam asking:pasting a piece of my requirement:
    <s:element minOccurs="0" maxOccurs="1" name="parameters" type="tns:ArrayOfCSParameters" />
    <s:complexType name="ArrayOfCSParameters">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded"
    name="CSParameters" nillable="true" type="tns:CSParameters" />
    </s:sequence>
    </s:complexType>
    <s:complexType name="CSParameters">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="RevenueItem" type="tns:RevenueItem" />
    <s:element minOccurs="0" maxOccurs="1" name="AccountURIs" type="tns:ArrayOfString" />
    <s:element minOccurs="0" maxOccurs="1" name="GroupURIs" type="tns:ArrayOfString" />
    <s:element minOccurs="1" maxOccurs="1" name="Percentage" nillable="true" type="s:decimal" />
    </s:sequence>
    <s:attribute name="Version" type="s:decimal" use="required" />
    <s:attribute name="URI" type="s:string" />
    </s:complexType>
    Any suggestion is appreciated.
    Regards
    pavan

    You have 2 options i guess.
    Use the transformation and the for-each to construct the array-list
    or like Richard said, use a loop in bpel, assign in the loop an variable of element type="CSParameters" and append this variable to your variable with accepts the arraylist.

  • FOTY0001 Error while calling ref:populateXRefRow function in BPEL

    I am getting folowing error while invoking populateXRefRow function in BPEL.
    Expression is : ref:populateXRefRow("CustomerTable","SAP","SAP001","EBS","EBS_001","ADD")
    TableName - CustomerTable
    Column Names- SAP,EBS
    Already ran xreftables.sql script and bounced the server too but still getting the error.
    Any solution?
    Thanks in Advance

    HI
    Usage of variables in populateXref statements in BPEL assign activities as follows :
    For example, the following is not supported:
    xref:populateXRefRow("apps_intg","common","common-12345",bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:appname'),bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:id'),"ADD")
    The following is supported:
    xref:populateXRefRow("apps_intg","common","common-12345",string(bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root
    -Element/ns3:appname')),string(bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:id')),"ADD")
    Please enclose the bpws:getVariableData() with string() function as populateXRefRow() expects strings as its arguments.
    Hope this resolves and answers your question.
    Cheers
    Anirudh Pucha

  • Appending XML node in bpel.

    Hi,
    I have a transform activity that creates a XML as below:
    <Students>
    <Student>
    <Name>A</Name>
    <Age>123</Age>
    </Student>
    </Students>
    After that i need to use an assign activity to append another student node with output as below:
    <Students>
    <Student>
    <Name>A</Name>
    <Age>123</Age>
    </Student>
    <Student> <!-- This is the appended node -->
    <Name>C</Name>
    <Age>452</Age>
    </Student>
    </Students>
    let me know how to achieve this using bpel assign activity.
    Thanks.

    It's something like this...
    Variable_1
    <list>
         <data>aa</data>
         <data>bb</data>
    </list>Variable_2
    <list>
         <data>1</data>
         <data>2</data>
    </list>Then you put an append in your ASSIGN activity
    <bpelx:append>
         <bpelx:from variable="Variable_2" query="/list/*"/>
         <bpelx:to variable="Variable_1" query="/list"/>
    </bpelx:append>And you get this as result...
    <list>
    <data>aa</data>
    <data>bb</data>
    <data>1</data>
    <data>2</data>
    </list>Cheers,
    Vlad

Maybe you are looking for