Sterling Managed File Transfer

Sterling Managed File Transfer

Come for answers, stay for best practices. All we're missing is you.

 View Only

Dynamic Service Names in B2Bi and SFG BPML

By Tanvi Kakodkar posted Mon February 10, 2020 02:49 PM

  
Originally updated on April 8, 2016 by VinceTkac

Service names are typically hard coded into BPML and compiled in statically at BP check-in time but there is a little-known (and from what I can find, undocumented) way to tell the engine you are going to supply the service name at runtime.  Here is an example.  This is primarily used in the system during web service execution.


Normally, you would write a BP like this to do a 5 second sleep
:

<process name="vmt_sleep">
  <sequence name="sleep5">
    <operation name="one">
      <participant name="SleepService"/>
      <output message="Xout">
        <assign to="SLEEP_INTERVAL">5</assign>
      </output>
      <input message="Xin">
      </input>
    </operation>
  </sequence>
</process>

 

which would produce this execution result: 

 

If you wanted to dynamically set the name of the service to execute, you could write the BP like this:

<process name="vmt_sleep">
  <sequence name="sleep5">

    <assign to="SVC_NAME">SleepService</assign>
    <assign to="SLEEP_INTERVAL">5</assign>

    <operation>
     <participant name="DynamicServiceInvokerService"/>
       <output message="Xout">
         <assign to="." from="*"></assign>
       </output>
       <input message="Xin" />
    </operation>

    <assign to="COMPLETE">true</assign>

  </sequence>
</process>


which would produce this execution result.


#IBMSterlingB2BIntegratorandIBMSterlingFileGatewayDevelopers
#DataExchange
0 comments
18 views

Permalink