1 Reply Latest reply: May 17, 2013 7:58 AM by 999231 RSS

    Variable is empty when using assign or transform.

    852203
      Hi All,

      Need to get the Variable populated??

      I have BPEL process that invoke a Web Service. In the invoke activity I can see that the variables are populated. <Status>0</Status>
      <ResponseMessage>OK</ResponseMessage> but if I assign it to a variable it is empty

      Below invoke Audit Trail in EM for invoke

      <messages>
      <Invoke1_rec_InputVariable>
      <part name="part1">
      <rec>
      <ns0:Ocr_Sequence_Number>0023JHB0008027122</ns0:Ocr_Sequence_Number>
      <ns0:Organization>660</ns0:Organization>
      <ns0:AccountProtectionPolicy>1</ns0:AccountProtectionPolicy>
      <ns0:Age>1</ns0:Age>
      <ns0:Bank_Account_Indicator>C</ns0:Bank_Account_Indicator>
      <ns0:Bank_Account_Number>1</ns0:Bank_Account_Number>
      <ns0:Bank_Branch_Name>ABSA</ns0:Bank_Branch_Name>
      <ns0:Bank_Name>1</ns0:Bank_Name>
      <ns0:Cell_Number>1</ns0:Cell_Number>
      <ns0:Club_Selected>N</ns0:Club_Selected>
      <ns0:Club_Type>CLSC</ns0:Club_Type>
      <ns0:Credit_Card_Type>1</ns0:Credit_Card_Type>
      <ns0:Date_of_Birth>19501010</ns0:Date_of_Birth>
      <ns0:Debit_Order_Authorisation>1</ns0:Debit_Order_Authorisation>
      <ns0:Debt_Company_Name_1>11</ns0:Debt_Company_Name_1>
      <ns0:Debt_Company_Name_2>1</ns0:Debt_Company_Name_2>
      <ns0:Debt_Company_Name_3>1</ns0:Debt_Company_Name_3>
      <ns0:Monthly_Deductions>1</ns0:Monthly_Deductions>
      <ns0:Monthly_Commitments>1</ns0:Monthly_Commitments>
      <ns0:Monthly_Instalments>1</ns0:Monthly_Instalments>
      <ns0:Dependents>1</ns0:Dependents>
      <ns0:Dorder_Account_Number>1</ns0:Dorder_Account_Number>
      <ns0:Dorder_Account_Type>1</ns0:Dorder_Account_Type>
      <ns0:Dorder_Amount>1</ns0:Dorder_Amount>
      <ns0:Dorder_Branch_Number>1</ns0:Dorder_Branch_Number>
      <ns0:Dorder_Day>1</ns0:Dorder_Day>
      <ns0:Dorder_Payment_Type>1</ns0:Dorder_Payment_Type>
      <ns0:Email_Address>2</ns0:Email_Address>
      <ns0:Employee_Number>2</ns0:Employee_Number>
      <ns0:Employer_Addr_1>2</ns0:Employer_Addr_1>
      <ns0:Employer_Addr_2>2</ns0:Employer_Addr_2>
      <ns0:Employer_Addr_3>2</ns0:Employer_Addr_3>
      <ns0:Employer_Address_Post>2</ns0:Employer_Address_Post>
      <ns0:Employer_Name>CCC</ns0:Employer_Name>
      <ns0:Employer_Telephone_Code>2</ns0:Employer_Telephone_Code>
      <ns0:Employer_Telephone_Ext>2</ns0:Employer_Telephone_Ext>
      <ns0:Employer_Telephone_Number>2</ns0:Employer_Telephone_Number>
      <ns0:Employment_Department>2</ns0:Employment_Department>
      <ns0:Employment_Months>2</ns0:Employment_Months>
      <ns0:Employment_Type>2</ns0:Employment_Type>
      <ns0:Employment_Years>2</ns0:Employment_Years>
      <ns0:Fax_Date>2</ns0:Fax_Date>
      <ns0:Fax_Time>2</ns0:Fax_Time>
      <ns0:First_Name>CAREL</ns0:First_Name>
      <ns0:Friend_Relative_First_Name>DDD</ns0:Friend_Relative_First_Name>
      <ns0:Friend_Relative_Full_Name>VVV</ns0:Friend_Relative_Full_Name>
      <ns0:Friend_Relative_Telephone_Code>2</ns0:Friend_Relative_Telephone_Code>
      <ns0:Friend_Relative_Telephone_Number>2</ns0:Friend_Relative_Telephone_Number>
      <ns0:Full_Name>CAREL</ns0:Full_Name>
      <ns0:Gender>2</ns0:Gender>
      <ns0:Home_Telephone>2</ns0:Home_Telephone>
      <ns0:Home_Telephone_Area>2</ns0:Home_Telephone_Area>
      <ns0:Home_Type_Indicator>2</ns0:Home_Type_Indicator>
      <ns0:Id_Number>2</ns0:Id_Number>
      <ns0:ID_Type>2</ns0:ID_Type>
      <ns0:Income_Amount>2</ns0:Income_Amount>
      <ns0:Income_Other>2</ns0:Income_Other>
      <ns0:Income_Total>2</ns0:Income_Total>
      <ns0:Last_Maintain_Operator>DDD</ns0:Last_Maintain_Operator>
      <ns0:Last_Name>MEINTJES</ns0:Last_Name>
      <ns0:Lost_Card_Protection>2</ns0:Lost_Card_Protection>
      <ns0:Marital_Status>2</ns0:Marital_Status>
      <ns0:Middle_Initial>C</ns0:Middle_Initial>
      <ns0:Monthly_Payment_Amount>2</ns0:Monthly_Payment_Amount>
      <ns0:Months_At_Bank>2</ns0:Months_At_Bank>
      <ns0:Occupation_Description>CC</ns0:Occupation_Description>
      <ns0:Postal_Addr_1>2</ns0:Postal_Addr_1>
      <ns0:Postal_Addr_2>2</ns0:Postal_Addr_2>
      <ns0:Postal_Address_Post_Code>2</ns0:Postal_Address_Post_Code>
      <ns0:Postal_Suburb_Town>2</ns0:Postal_Suburb_Town>
      <ns0:Previous_Employment_Months>2</ns0:Previous_Employment_Months>
      <ns0:Previous_Employment_Years>2</ns0:Previous_Employment_Years>
      <ns0:Previous_Residence_Months>2</ns0:Previous_Residence_Months>
      <ns0:Previous_Residence_Year>2</ns0:Previous_Residence_Year>
      <ns0:Relationship_Code>3</ns0:Relationship_Code>
      <ns0:Rent_Buy_Code>3</ns0:Rent_Buy_Code>
      <ns0:Requested_Products>3</ns0:Requested_Products>
      <ns0:Residence_Months>3</ns0:Residence_Months>
      <ns0:Residence_Years>3</ns0:Residence_Years>
      <ns0:Residential_Address_1>3</ns0:Residential_Address_1>
      <ns0:Residential_Address_2>3</ns0:Residential_Address_2>
      <ns0:Residential_Address_3>3</ns0:Residential_Address_3>
      <ns0:Residential_Address_Name>3</ns0:Residential_Address_Name>
      <ns0:Residential_Address_Post>3</ns0:Residential_Address_Post>
      <ns0:Source>3</ns0:Source>
      <ns0:Spouse_Cellphone>3</ns0:Spouse_Cellphone>
      <ns0:Spouse_Employer_Name>CH</ns0:Spouse_Employer_Name>
      <ns0:Spouse_Employer_Telephone_code>3</ns0:Spouse_Employer_Telephone_code>
      <ns0:Spouse_Employer_Telephone_ext>3</ns0:Spouse_Employer_Telephone_ext>
      <ns0:Spouse_Employer_Telephone_number>3</ns0:Spouse_Employer_Telephone_number>
      <ns0:Spouse_First_Name>CAREL</ns0:Spouse_First_Name>
      <ns0:Spouse_Full_Name>DF</ns0:Spouse_Full_Name>
      <ns0:Spouse_Occupation>IT</ns0:Spouse_Occupation>
      <ns0:Store_Code>26</ns0:Store_Code>
      <ns0:Title>MR</ns0:Title>
      <ns0:Total_Credit_Reference>3</ns0:Total_Credit_Reference>
      <ns0:Total_Months_At_Bank>3</ns0:Total_Months_At_Bank>
      <ns0:Total_Months_At_Res>3</ns0:Total_Months_At_Res>
      <ns0:Total_Months_At_Work>3</ns0:Total_Months_At_Work>
      <ns0:Total_Years_At_Work>4</ns0:Total_Years_At_Work>
      <ns0:Years_At_Bank>4</ns0:Years_At_Bank>
      <ns0:Account_Protection_Partner>4</ns0:Account_Protection_Partner>
      <ns0:Supress_Marketing>4</ns0:Supress_Marketing>
      <ns0:Fist_Names>CAREL</ns0:Fist_Names>
      <ns0:Marriage_Status>4</ns0:Marriage_Status>
      <ns0:Bond_Balance>4</ns0:Bond_Balance>
      <ns0:Debt_Review>4</ns0:Debt_Review>
      <ns0:Spouse_Income>1</ns0:Spouse_Income>
      <ns0:Outstanding_Balances>4</ns0:Outstanding_Balances>
      <ns0:Advertising_By_Mail>N</ns0:Advertising_By_Mail>
      <ns0:Advertising_By_Telephone>N</ns0:Advertising_By_Telephone>
      <ns0:Advertising_By_Sms>N</ns0:Advertising_By_Sms>
      <ns0:Advertising_By_Email>N</ns0:Advertising_By_Email>
      <ns0:External_Marketing>N</ns0:External_Marketing>
      <ns0:Auto_Limit_Increase>N</ns0:Auto_Limit_Increase>
      <ns0:Bureau_Consent>N</ns0:Bureau_Consent>
      <ns0:Preferred_Language>E</ns0:Preferred_Language>
      <ns0:Spouse_Consent>N</ns0:Spouse_Consent>
      <ns0:Nationality>SOUTH AFRICA</ns0:Nationality>
      <ns0:Country>SOUTH AFRICA</ns0:Country>
      <ns0:CityOfResidence>VEREENIGING</ns0:CityOfResidence>
      <ns0:ApplicationUser>111</ns0:ApplicationUser>
      </rec>
      </part>

      </Invoke1_rec_InputVariable>
      <Invoke1_rec_OutputVariable>
      <part name="part1">
      <recResponse>
      <AccountInformationReply>
      <Status>0</Status>
      <ResponseMessage>OK</ResponseMessage>
      </AccountInformationReply>
      </recResponse>
      </part>
      </Invoke1_rec_OutputVariable>
      </messages>


      Error when assign
      <bpelFault>
      <faultType>0</faultType>
      <selectionFailure/>
      </bpelFault>


      16 May 2013 5:45:38 PM Error in evaluate <from> expression at line "67". The result is empty for the XPath expression : "bpws:getVariableData(&apos;Invoke1_rec_OutputVariable&apos;,&apos;part1&apos;,&apos;/ns2:AccountInformationReply/ns2:Status&apos;)".
      16 May 2013 5:45:38 PM The following exception occurred while attempting to execute operation copy at line 66


      See BPEL Code

      <process name="OnlineOpBPEL"
      targetNamespace="http://xmlns.oracle.com/NAPI/NCAOnlineOptical/OnlineOpBPEL"
      xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns:client="http://xmlns.oracle.com/NAPI/NCAOnlineOptical/OnlineOpBPEL"
      xmlns:ora="http://schemas.oracle.com/xpath/extension"
      xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns:ns1="http://oracle.com/sca/soapservice/NAPI/NCAOnlineOptical/Service1"
      xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
      xmlns:ns2="http://10.29.10.59:8889"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns3="http://services.edcon.ac.za/edcon/schema/xsd/ApplicationAccountInformation">

      <!--
      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      ORCHESTRATION LOGIC
      Set of activities coordinating the flow of messages across the
      services integrated within this business process
      ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      -->
      <partnerLinks>
      <partnerLink name="Service1" partnerLinkType="ns1:Service1"
      myRole="execute_ptt"/>
      <partnerLink name="PartnerLink1" partnerLinkType="ns2:execute_ptt_PL"
      partnerRole="execute_ptt_Role"/>
      </partnerLinks>
      <variables>
      <variable name="Receive1_execute_InputVariable"
      messageType="ns1:requestMessage"/>
      <variable name="Invoke1_rec_InputVariable"
      messageType="ns2:requestMessage"/>
      <variable name="Invoke1_rec_OutputVariable" messageType="ns2:replyMessage"/>
      <variable name="Variable1" type="xsd:string"/>
      </variables>
      <sequence name="main">
      <receive name="Receive1" createInstance="yes"
      variable="Receive1_execute_InputVariable" partnerLink="Service1"
      portType="ns1:execute_ptt" operation="execute"/>
      <assign name="Transform1">
      <bpelx:annotation>
      <bpelx:pattern>transformation</bpelx:pattern>
      </bpelx:annotation>
      <copy>
      <from expression="ora:doXSLTransformForDoc('xsl/Transformation_1.xsl', $Receive1_execute_InputVariable.part1)"/>
      <to variable="Invoke1_rec_InputVariable" part="part1"/>
      </copy>
      </assign>
      <invoke name="Invoke1"
      inputVariable="Invoke1_rec_InputVariable"
      outputVariable="Invoke1_rec_OutputVariable"
      partnerLink="PartnerLink1" portType="ns2:execute_ptt"
      operation="rec" bpelx:invokeAsDetail="no"/>
      <assign name="Assign1">
      <copy>
      <from expression="bpws:getVariableData('Invoke1_rec_OutputVariable','part1','/ns2:AccountInformationReply/ns2:Status')"/>
      <to variable="Variable1"/>
      </copy>
      </assign>
      </sequence>
      </process>
        • 1. Re: Variable is empty when using assign or transform.
          999231
          Hi
          Below XPath is wrong
          <from expression="bpws:getVariableData('Invoke1_rec_OutputVariable','part1','/ns2:AccountInformationReply/ns2:Status')"/>

          Replace the above with following in your BPEL Process

          Correct one:

          <from expression="bpws:getVariableData('Invoke1_rec_OutputVariable','part1','/ns2:recResponse/ns2:AccountInformationReply/ns2:Status')"/>

          Regards
          Vamsi..