1 Reply Latest reply on May 28, 2013 2:15 PM by David Ward

    Regarding quickstart-bpm-service

    simon shen Newbie

      I create a switchyard project doing the same things like quickstart-bpm-service.

      But I ran into some issues.

       

      1. I Confused with the following inputs of ProcessOrder component.

         Where they are coming from?

         How do we know their expression?

      b1.PNG

      2. I Cannot see the Source parameters of InventoryBean

      b3.png

      -------------------------------------------------------------------------------------------------------------------------------

      -------------------------------------------------------------------------------------------------------------------------------

      My switchyard.xml

      b2.PNG

      <?xml version="1.0" encoding="UTF-8"?>

      <switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:bpm="urn:switchyard-component-bpm:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:1.0" name="episode11" targetNamespace="urn:com.example.switchyard:episode11:1.0">

        <sca:composite name="episode11" targetNamespace="urn:com.example.switchyard:episode11:1.0">

          <sca:component name="ProcessOrder">

            <bpm:implementation.bpm persistent="false" processId="ProcessOrder">

              <bpm:actions>

                <bpm:action type="START_PROCESS">

                  <bpm:inputs>

                    <bpm:mapping expression="message.content" expressionType="MVEL" variable="contentInput"/>

                    <bpm:mapping expression="userName" expressionType="MVEL" variable="userName"/>

                    <bpm:mapping expression="context['org.switchyard.messageId']" expressionType="MVEL" variable="messageId"/>

                  </bpm:inputs>

                </bpm:action>

              </bpm:actions>

              <bpm:manifest>

                <bpm:resources>

                  <bpm:resource location="META-INF/ProcessOrder.bpmn" type="BPMN2"/>

                </bpm:resources>

              </bpm:manifest>

            </bpm:implementation.bpm>

            <sca:service name="ProcessOrder">

              <sca:interface.java interface="com.example.switchyard.episode11.ProcessOrder"/>

            </sca:service>

            <sca:reference name="Inventory">

              <sca:interface.java interface="com.example.switchyard.episode11.Inventory"/>

            </sca:reference>

            <sca:reference name="Shipping">

              <sca:interface.java interface="com.example.switchyard.episode11.Shipping"/>

            </sca:reference>

            <sca:reference name="BackOrder">

              <sca:interface.java interface="com.example.switchyard.episode11.BackOrder"/>

            </sca:reference>

          </sca:component>

          <sca:service name="ProcessOrder" promote="ProcessOrder/ProcessOrder">

            <sca:interface.wsdl interface="wsdl/ProcessOrder.wsdl#wsdl.porttype(ProcessOrder)"/>

            <soap:binding.soap>

              <soap:contextMapper/>

              <soap:wsdl>wsdl/ProcessOrder.wsdl</soap:wsdl>

              <soap:socketAddr>localhost:${soapPort:18001}</soap:socketAddr>

              <soap:contextPath>swydws</soap:contextPath>

            </soap:binding.soap>

          </sca:service>

          <sca:component name="InventoryBean">

            <bean:implementation.bean class="com.example.switchyard.episode11.InventoryBean"/>

            <sca:service name="Inventory">

              <sca:interface.java interface="com.example.switchyard.episode11.Inventory"/>

            </sca:service>

          </sca:component>

          <sca:component name="ShippingBean">

            <bean:implementation.bean class="com.example.switchyard.episode11.ShippingBean"/>

            <sca:service name="Shipping">

              <sca:interface.java interface="com.example.switchyard.episode11.Shipping"/>

            </sca:service>

          </sca:component>

          <sca:component name="BackOrderBean">

            <bean:implementation.bean class="com.example.switchyard.episode11.BackOrderBean"/>

            <sca:service name="BackOrder">

              <sca:interface.java interface="com.example.switchyard.episode11.BackOrder"/>

            </sca:service>

          </sca:component>

        </sca:composite>

      </switchyard>

       

      Thanks for your help

        • 1. Re: Regarding quickstart-bpm-service
          David Ward Master

          The "inputs" expressions are MVEL expressions, and when resolved, got placed into process-level variables by SwitchYard.  To see those process variable definitions, you need to click on the background of your BPM process, not on one of the process nodes as you are above.  Of the inputs, the "message" is an implicit variable which is the org.switchyard.Message, and the "context" variable is an implicit variable (and "Map wrapper" around) an org.switchyard.Context.

           

          The userName variable is something that gets resolved because, in the original example, there was a switchyard/domain/properties/property element of name="userName".  It looks like you've deleted it in your switchyard.xml above.

           

          These MVEL expressions are not the same thing as your node input parameter expression source that you have circled above.