Two different options in Input Message

admin's picture
There are 2 different options for Input Message:
 
Allow Process Data write
 
If you use option 'Allow Process Data write' for an Input Message in a service, the result of service execution will be placed in the Process Data.
How it looks like in bpml code:
 
 <operation name="File System Adapter">
          <participant name="PLIVA_FSA"/>
          <output message="FileSystemInputMessage">
                   <assign to="Action">FS_COLLECT</assign>
                   <assign to="deleteAfterCollect">false</assign>
                   <assign to="filter">mimi</assign>
                   <assign to="." from="*"/>
          </output>
          <input message="inmsg">
                        <assign to="." from="*"/>
            </input>
</operation>
 
 
Allow message write
 
If you use option 'Allow message write' for an Input Message in a service, the result of service execution will be placed into the input message.
 
Input message for this option in bpml looks as follows:
 
<operation name="File System Adapter">
          <participant name="PLIVA_FSA"/>
          <output message="FileSystemInputMessage">
                   <assign to="Action">FS_COLLECT</assign>
                   <assign to="deleteAfterCollect">false</assign>
                   <assign to="filter">mimi</assign>
                   <assign to="." from="*"/>
          </output>
          <input message="inmsg">
      </input>
</operation>
 
When you start the process and want to see an Input Message for a certain service, go into Process Monitor, find your process, open it, click on info of Instance data for the service which Input Message you want to see and finally click on 'Message From Service' link on the left side will show you input message sent from the service to the business process.
 
  • For Get Document Information Service input message looks like this:
 
<?xml version="1.0" encoding="UTF-8"?>
<inmsg>
          <BodyName>bodyName</BodyName>
          <BodyLength>1076</BodyLength>
          <DocumentBodyLength>1076</DocumentBodyLength>
          <DocumentName>documentName</DocumentName>
          <DocumentId>serverName:49b61c40:11032a4d48e:3b0b</DocumentId>
          <DocumentSubject/>
          <DocumentCreateTime/>
          <DocumentLength>1076</DocumentLength>
          <DocumentLifeSpan>0 Minutes</DocumentLifeSpan>
          <DocumentInitialId>madrugada:49b61c40:11032a4d48e:3b0b</DocumentInitialId>
          <DocumentMaxInlineBodySize>102400</DocumentMaxInlineBodySize>
          <DocumentPurgeAfter>2007-01-18 12:21:23.93</DocumentPurgeAfter>
          <DocumentStorageType>DATABASE</DocumentStorageType>
          <DocumentWorkflowId>200152</DocumentWorkflowId>
          <DocumentType>0</DocumentType>
</inmsg>
 
It is the result of Get Document Information service that goes into Process Data with option 'Allow Process Data write', but when you choose option 'Allow Message write' it is not placed in the Process Data, but into Input Message or Message From Service as shown above.
 
  • For File System Adapter in collection mode, its result is FileName and Primary Document, Input Message looks like as follows:
 
<?xml version="1.0" encoding="UTF-8"?>
<inmsg>
          <FileName>fileName</FileName>
          <PrimaryDocument SCIObjectID="serverName:49b61c40:11032a4d48e:3b53"/>
</inmsg>
 
Remember that the rest of services in your BP will not be able to get any information that is redirected into Input Message. Input message content retains only for the current service, but not for the whole process.
The Process Data is accumulation area that lives from the beginning of the process to the end.
Input message is accesible just by a service that executes an activity and produce that message, and you can take some elements that you will need later, by assign(s) inside of the input message and put it into Process Data for later use.