<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="PDACreateBoxByLabelForPCBA.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="charge" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/CHARGE')" />
        <variable name="CreateBoxByLabelForPCBA" messageType="java.lang.String"></variable>
        <variable name="endDate" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ENDDATE')" />
        <variable name="erpFactory" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPFACTORY')" />
        <variable name="erpLocation" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPLOCATION')" />
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTUSER')" />
        <variable name="Flag" messageType="java.lang.String"></variable>
        <variable name="makeDate" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MAKEDATE')" />
        <variable name="materialPackingName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="materialSpecName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALSPECNAME')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="NPFlag" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/NPFLAG')" />
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="PDACreateBoxByLabelForPCBA" messageType="java.lang.String"></variable>
        <variable name="PDASender" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEACTNO')" />
        <variable name="receiveQuantity" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEQTY')" />
        <variable name="receiveRequestName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEREQUESTNAME')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="supplierName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SUPPLIERNAME')" />
    </variables>
    <sequence>
        <receive name="PDACreateBoxByLabelForPCBA" bounds="172,30,149,81">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="MaterialPackingServiceImpl checkFlagForSMT" type="invokebean" description="public java.lang.String checkFlagForSMT(org.jdom.Document message)" bounds="176,141,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="checkFlagForSMT" operationDesc="public java.lang.String checkFlagForSMT(org.jdom.Document message)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="message" type="org.jdom.Document" />
            <output variable="Flag" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="167,276,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="230,412,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="191,491,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('Flag') = 'Create'" bounds="107,570,75,80">
                <source idx="0" terminal="5,A" />
                <invoke name="EventInfoUtil makeEventInfo" type="invokebean" description="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="74,680,141,105" partnerLink="EventInfoUtil" partnerLinkType="EventInfoUtil" operation="makeEventInfo" operationDesc="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input constant="CreateBoxByLabelForPCBA" type="java.lang.String" />
                    <input variable="eventUser" type="java.lang.String" />
                    <input variable="eventComment" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <output variable="eventInfo" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl PDACreateBoxByLabelForPCBA" type="invokebean" description="public void PDACreateBoxByLabelForPCBA(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String receiveRequestName, java.lang.String materialPackingName, java.lang.String materialSpecName, java.lang.String makeDate, java.lang.String receiveQuantity, java.lang.String erpLocation, java.lang.String supplierName, java.lang.String NPFlag, java.lang.String endDate, java.lang.String charge, java.lang.String erpFactory, org.jdom.Document message)" bounds="74,815,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="PDACreateBoxByLabelForPCBA" operationDesc="public void PDACreateBoxByLabelForPCBA(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String receiveRequestName, java.lang.String materialPackingName, java.lang.String materialSpecName, java.lang.String makeDate, java.lang.String receiveQuantity, java.lang.String erpLocation, java.lang.String supplierName, java.lang.String NPFlag, java.lang.String endDate, java.lang.String charge, java.lang.String erpFactory, org.jdom.Document message)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="receiveActNo" type="java.lang.String" />
                    <input variable="receiveRequestName" type="java.lang.String" />
                    <input variable="materialPackingName" type="java.lang.String" />
                    <input variable="materialSpecName" type="java.lang.String" />
                    <input variable="makeDate" type="java.lang.String" />
                    <input variable="receiveQuantity" type="java.lang.String" />
                    <input variable="erpLocation" type="java.lang.String" />
                    <input variable="supplierName" type="java.lang.String" />
                    <input variable="NPFlag" type="java.lang.String" />
                    <input variable="endDate" type="java.lang.String" />
                    <input variable="charge" type="java.lang.String" />
                    <input variable="erpFactory" type="java.lang.String" />
                    <input variable="message" type="org.jdom.Document" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('Flag') = 'Delete'" bounds="313,570,70,55">
                <source idx="0" terminal="5,A" />
                <invoke name="EventInfoUtil makeEventInfo" type="invokebean" description="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="278,655,141,105" partnerLink="EventInfoUtil" partnerLinkType="EventInfoUtil" operation="makeEventInfo" operationDesc="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input constant="DeleteBoxByLabelForPCBA" type="java.lang.String" />
                    <input variable="eventUser" type="java.lang.String" />
                    <input variable="eventComment" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <output variable="eventInfo" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl PDADeleteBoxByLabelForPCBA" type="invokebean" description="public void PDADeleteBoxByLabelForPCBA(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveRequestName, java.lang.String materialPackingName, java.lang.String materialSpecName, org.jdom.Document message)" bounds="278,790,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="PDADeleteBoxByLabelForPCBA" operationDesc="public void PDADeleteBoxByLabelForPCBA(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveRequestName, java.lang.String materialPackingName, java.lang.String materialSpecName, org.jdom.Document message)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="receiveRequestName" type="java.lang.String" />
                    <input variable="materialPackingName" type="java.lang.String" />
                    <input variable="materialSpecName" type="java.lang.String" />
                    <input variable="message" type="org.jdom.Document" />
                </invoke>
            </case>
            <switchend name="switchend" type="switchend" bounds="331,940,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
        <switch name="switch" bounds="370,1019,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="331,1098,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('siteName') = 'B17'&#xD;&#xA;and (starts-with(getVariable('materialSpecName'),'44-977') or starts-with(getVariable('materialSpecName'),'44-971'))" bounds="216,1177,60,54">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl updateTrayInfo" type="invokebean" description="public void updateTrayInfo(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String materialPackingName, java.lang.String flag)" bounds="176,1261,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="updateTrayInfo" operationDesc="public void updateTrayInfo(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String materialPackingName, java.lang.String flag)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="materialPackingName" type="java.lang.String" />
                    <input variable="Flag" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="483,1177,88,46">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="331,1386,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="305,1465,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="316,1598,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="replySubjectName" type="java.lang.String" />
            <input variable="message" type="org.jdom.Document" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

