Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpel-dev] BPEL uninitializedVariable



On Thu, May 17, 2012 at 12:55 PM, Themba Shezi <mrtshezi@xxxxxxxxx> wrote:
Hi

I'm trying to invoke external web service orchestrated using Apache ode, it deploys successful but when i tried to test the following unexpected response appear. Please help i have struggling with this error for two days now

ERROR [INVOKE] org.apache.ode.bpel.common.FaultException: The variable getAmountPLRequest isn't properly initialized
Before you refer a variable you need to initialize it. So Before InvokeGetAmount activity , use an assign activity to initialize the getAmountPLRequest variable.

here is my process

<!-- loanProcess BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Thu May 17 08:07:38 CAT 2012 -->
<bpel:process name="loanProcess"
         targetNamespace="http://laonProcess.prs"
         suppressJoinFailure="yes"
         xmlns:tns="http://laonProcess.prs"

    <!-- Import the client WSDL -->
    <bpel:import namespace="http://Bank.laonBrokerApp.org" location="Bank.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import namespace="http://Lender.loanBrokerApp.org" location="Lenders.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import namespace="http://CreditAgency.loanBrokerApp.org" location="creditAgency.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import location="loanProcessArtifacts.wsdl" namespace="http://laonProcess.prs
       importType="http://schemas.xmlsoap.org/wsdl/" />
         
    <!-- ================================================================= -->         
    <!-- PARTNERLINKS                                                      -->
    <!-- List of services participating in this BPEL process               -->
    <!-- ================================================================= -->         
    <bpel:partnerLinks>
        <!-- The 'client' role represents the requester of this service. -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:loanProcess"
                     myRole="loanProcessProvider"
                     />
        <bpel:partnerLink name="getAmountPL" partnerLinkType="tns:getAmountPLT" partnerRole="getAmountRole"></bpel:partnerLink>
        <bpel:partnerLink name="crditHistoryPL" partnerLinkType="tns:creditHistoryPLT" partnerRole="creditHistoryRole"></bpel:partnerLink>
        <bpel:partnerLink name="creditScore" partnerLinkType="tns:creditScorePLT" partnerRole="creditScoreRole"></bpel:partnerLink>
        <bpel:partnerLink name="LendersPL" partnerLinkType="tns:LenderPLT" partnerRole="LenderRole"></bpel:partnerLink>
        <bpel:partnerLink name="BankPL" partnerLinkType="tns:BankPLT" partnerRole="BankRole"></bpel:partnerLink>
        <bpel:partnerLink name="BankResultsPL" partnerLinkType="tns:BankPLT" partnerRole="BankRole"></bpel:partnerLink>
    </bpel:partnerLinks>
  
    <!-- ================================================================= -->         
    <!-- VARIABLES                                                         -->
    <!-- List of messages and XML documents used within this BPEL process  -->
    <!-- ================================================================= -->         
    <bpel:variables>
        <!-- Reference to the message passed as input during initiation -->
        <bpel:variable name="input"
                  messageType="tns:loanProcessRequestMessage"/>
                  
        <!-- 
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:loanProcessResponseMessage"/>
        <bpel:variable name="getAmountPLResponse" messageType="ns:getAmountResponse"></bpel:variable>
        <bpel:variable name="getAmountPLRequest" messageType="ns:getAmountRequest"></bpel:variable>
        <bpel:variable name="getAmountPLResponse1" messageType="ns:calcHistLengthResponse"></bpel:variable>
        <bpel:variable name="getAmountPLRequest1" messageType="ns:calcHistLengthRequest"></bpel:variable>
        <bpel:variable name="creditScoreResponse" messageType="ns:calcScoreResponse"></bpel:variable>
        <bpel:variable name="creditScoreRequest" messageType="ns:calcScoreRequest"></bpel:variable>
        <bpel:variable name="LendersPLResponse" messageType="ns0:selectLendersResponse"></bpel:variable>
        <bpel:variable name="LendersPLRequest" messageType="ns0:selectLendersRequest"></bpel:variable>
        <bpel:variable name="BankPLResponse" messageType="ns1:calcRateResponse"></bpel:variable>
        <bpel:variable name="BankPLRequest" messageType="ns1:calcRateRequest"></bpel:variable>
        <bpel:variable name="BankResultsPLResponse" messageType="ns1:ResultsResponse"></bpel:variable>
        <bpel:variable name="BankResultsPLRequest" messageType="ns1:ResultsRequest"></bpel:variable>
    </bpel:variables>

    <!-- ================================================================= -->         
    <!-- ORCHESTRATION LOGIC                                               -->
    <!-- Set of activities coordinating the flow of messages across the    -->
    <!-- services integrated within this business process                  -->
    <!-- ================================================================= -->         
    <bpel:sequence name="LoanProcess">
        
        <!-- Receive input from requester. 
             Note: This maps to operation defined in loanProcess.wsdl 
             -->
        <bpel:receive name="receiveInput" partnerLink="client"
                 portType="tns:loanProcess"
                 operation="process" variable="input"
                 createInstance="yes"/>
        
        <!-- Generate reply to synchronous request -->
        <bpel:invoke name="InvokeGetAmount" partnerLink="getAmountPL" operation="getAmount" portType="ns:CreditAgencyPortType" inputVariable="getAmountPLRequest" outputVariable="getAmountPLResponse"></bpel:invoke>
        <bpel:invoke name="InvokeCreditHistory" partnerLink="getAmountPL" operation="calcHistLength" portType="ns:CreditAgencyPortType" inputVariable="getAmountPLRequest1" outputVariable="getAmountPLResponse1"></bpel:invoke>
        <bpel:invoke name="InvokeCreditScore" partnerLink="creditScore" operation="calcScore" portType="ns:CreditAgencyPortType" inputVariable="creditScoreRequest" outputVariable="creditScoreResponse"></bpel:invoke>
        
        <bpel:assign validate="no" name="AssignLenderInput">
            <bpel:copy>
                <bpel:from><bpel:literal><ns:selectLenders xmlns:ns="http://Lender.loanBrokerApp.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ns:am>ns:am</ns:am>
  <ns:score>0</ns:score>
  <ns:hlength>0</ns:hlength>
</ns:selectLenders>
</bpel:literal></bpel:from>
                <bpel:to variable="LendersPLRequest" part="parameters"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="payload" variable="input">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="LendersPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:am]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="creditScoreResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="LendersPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:score]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="getAmountPLResponse1">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="LendersPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:hlength]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            
        </bpel:assign>
        <bpel:invoke name="InvokeLenders" partnerLink="LendersPL" operation="selectLenders" portType="ns0:LendersPortType" inputVariable="LendersPLRequest" outputVariable="LendersPLResponse"></bpel:invoke>
        <bpel:assign validate="no" name="AssignBankName">
            <bpel:copy>
                <bpel:from><bpel:literal><ns:Results xmlns:ns="http://Bank.laonBrokerApp.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ns:rate>0.0</ns:rate>
  <ns:creditHistory>0</ns:creditHistory>
  <ns:creditScore>0</ns:creditScore>
  <ns:amount>ns:amount</ns:amount>
  <ns:bName>ns:bName</ns:bName>
</ns:Results>
</bpel:literal></bpel:from>
                <bpel:to variable="BankResultsPLRequest" part="parameters"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="LendersPLResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="BankResultsPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:bName]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="getAmountPLResponse1">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="BankResultsPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:creditHistory]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="creditScoreResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="BankResultsPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:creditScore]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="BankPLResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="BankResultsPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:rate]]></bpel:query>
                </bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="getAmountPLResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="BankResultsPLRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:amount]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:invoke name="InvokeBank" partnerLink="BankPL" operation="calcRate" portType="ns1:BankPortType" inputVariable="BankPLRequest" outputVariable="BankPLResponse"></bpel:invoke>
        <bpel:invoke name="InvokeBankResults" partnerLink="BankResultsPL" operation="Results" portType="ns1:BankPortType" inputVariable="BankResultsPLRequest" outputVariable="BankResultsPLResponse"></bpel:invoke>
        <bpel:assign validate="no" name="AssignResults">
            <bpel:copy>
                <bpel:from><bpel:literal><tns:loanProcessResponse xmlns:tns="http://laonProcess.prs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tns:result>tns:result</tns:result>
</tns:loanProcessResponse>
</bpel:literal></bpel:from>
                <bpel:to variable="output" part="payload"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="BankResultsPLResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:return]]></bpel:query>
                </bpel:from>
                <bpel:to part="payload" variable="output">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="replyOutput" 
               partnerLink="client"
               portType="tns:loanProcess"
               operation="process" 
               variable="output"
               />
    </bpel:sequence>
</bpel:process>




_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev



Back to the top