Three different options in Output Message

admin's picture
There are 3 different options for Output Message:
 
Obtain Message first, then Process Data
 
It sends configuration parameters, all defined in XML Output Message to a service first and after that Process Data. If there are elements with the same names in output message as in the Process Data, the business Process Data overrides the service configuration information. Service will always read parameters from its configuration, or Output Message first and after that from Process Data.
 
How it looks like in bpml code for e.g. File System Adapter:
 
<operation name="File System Adapter">
          <participant name="FSA_configurationName"/>
          <output message="FileSystemInputMessage">
                   <assign to="Action">FS_COLLECT</assign>
                   <assign to="appendOnExtract">true</assign>
                   <assign to="deleteAfterCollect">false</assign>
                   <assign to="filter" from="assignedFilter/text()"/>
                   <assign to="genReport">true</assign>
                   <assign to="." from="*"/>
          </output>
          <input message="inmsg">
                   <assign to="." from="*"/>
          </input>
</operation>
 
We see that assign element (<assign to="." from="*"/>) comes after configuration parameters, as the last element in the output message. So what service read first are parameters from configuration and after that from Process Data.
 
Obtain Process Data first, then Messages
 
It sends Process Data first to a service and service configuration information after Process Data. If duplicate information can be found between Output Message (containing service configuration parameters) and Process Data, parameters from the configuration overrides Process Data.
 
How it looks like in bpml code for e.g. File System Adapter:
 
<operation name="File System Adapter">
          <participant name=" FSA_configurationName "/>
          <output message="FileSystemInputMessage">
                   <assign to="." from="*"/>
                   <assign to="Action">FS_COLLECT</assign>
                   <assign to="appendOnExtract">true</assign>
                   <assign to="deleteAfterCollect">false</assign>
                   <assign to="filter" from="assignedFilter/text()"/>
                   <assign to="genReport">true</assign>
          </output>
          <input message="inmsg">
                   <assign to="." from="*"/>
          </input>
</operation>
 
We see that assign element (<assign to="." from="*"/>) comes first and configuration parameters after it. So what service reads first is Process Data and after that parameters from configuration.
 
Messages Only
 
Sends only parameters from configuration, that is Output Message to a service. In that case, service will not be able to read anything from the Process Data.
 
<operation name="File System Adapter">
          <participant name="FSA_configurationName"/>
          <output message=" FileSystemInputMessage ">
                   <assign to="Action">FS_COLLECT</assign>
                   <assign to="appendOnExtract">true</assign>
                   <assign to="deleteAfterCollect">false</assign>
                   <assign to="filter" from="assignedFilter/text()"/>
                   <assign to="genReport">true</assign>
          </output>
          <input message="inmsg">
                   <assign to="." from="*"/>
          </input>
</operation>
 
You see there is no assign <assign to="." from="*"/>in output message any more, so Process Data will not be read.
 
Be aware that with this option set – Messages Only, for a service that needs a Primary Document to work on, the service will not be able to read the Primary Document, because it is always placed in the Process Data. If you configure File System Adapter for extraction with Output Message in mode 'Messages Only', the adapter will throw an error that there is no Primary Document, although you can find the Primary Document in the Process Data. But in this mode service cannot read anything from the Process Data.