About Input and Output Messages and Process Data
Process data content is independent and is not directly available to services. Therefore, to configure a service to use information placed in process data, the process writer must configure the service to enable access to it.
The business process writer controls both the data that is sent to a service for a step and what data from a service is put into process data, by configuring input and output instructions in the process definition (BPML). The input and output data for a service is referred to as input and output messages (you can see these terms used in the Service Editor in the GPM and your service configurations in the Sterling B2B Integrator interface).
The input and output instructions for the messages are BPML assign elements. Assign elements set a value in the business process data that is equal to a fixed value. Inside an input or output element, the assign element identifies a message it should receive from a participant or identifies the contents of a message it should send to a participant. Therefore, assign elements specify the message data, and messages are the mechanism by which services get data from and return data to a business process' process data. These messages are represented as XML (DOM) documents.
The syntax used to encode input and output messages with respect to the business process definition are as follows:
- The <output> tag specifies what data should be output from the business process to the service (that is, copied from the process data).
- The <input> tag specifies what data in the output of a service should be used as input to the business process (that is, copied to the process data).
- Not all services require input or produce output. Even if a service does produce output, the business process writer is not required to use any or all of the data returned by a service.
- Output assignments happen before the service executes. Input mappings happen after the service has completed.
- The ‘from' attribute of an assign statement
can be any XPath expression and can identify multiple nodes. The ‘to'
attribute of an assign statement must point to an individual node.
Note: Be sure to avoid the following possible problems when allowing a service to read and write the process data area directly:
- A service can read data that you may not have intended to be read.
- A service can write data, or overwrite data, that you did not intend to be written or overwritten.