The sequence of activities in the following activity diagram will return three values to the caller (in this case the client): out1, out2, and out3. Note, that these values are temporarily written to an output buffer. Only at the end of the sequence, the contents of this buffer are serialized and returned to the client.

Figure: Sequence with Three Output Objects

An action can have more than one output object. The figure below shows how to create two objects in one action.

Figure: Action State Generating Two Output Objects

The result of both of the above implementations (SOAP output XML structure) would look like follows:

...
 <out1 xmlns:ns1="urn:Services.CreateExampleService.Classes" xsi:type="ns1:SimpleClass">
   <simpleAttribute xsi:type="xsd:string">first value</simpleAttribute>
 </out1>

 <out2 xmlns:ns2="urn:Services.CreateExampleService.Classes" xsi:type="ns2:SimpleClass">
   <simpleAttribute xsi:type="xsd:string">second value </simpleAttribute>
 </out2>

 <out3 xmlns:ns3="urn:Services.CreateExampleService.Classes" xsi:type="ns3:SimpleClass">
   <simpleAttribute xsi:type="xsd:string">third value</simpleAttribute>
 </out3>
 ...

Actually, the most performing policy would be to draw an action that creates and returns all three objects, as it would result in only one function call of the E2E Runtime.

  • No labels