Release Service
The Release service is a system service that is used to remove elements from the process data of a business process.
The following table provides an overview of the Release service:
Category | Description |
---|---|
System name | ReleaseService |
Graphical Process Modeler (GPM) categories | All Services, System |
Description | The Release service is a system service that is used to remove elements from the process data of a business process. |
Business usage | None – System service |
Usage example | Use the Release service to remove elements that are no longer needed by a business process. Some of the benefits for using the Release service include:
|
Preconfigured? | Yes |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms. |
Related services | Assign activity – Used to put data into process data for a business process. |
Application requirements | None |
Initiates business processes? | No |
Invocation | Runs as part of a business process. |
Business process context considerations | None |
Returned status values | Returned status values:
|
Testing considerations | None (system service) |
How the Release Service Works
The Release service is a system service used to remove information from process data in business processes. See Usage Examples for examples using the Release service.
Implementing the Release Service
Because the Release service is preconfigured, you only need to include the service in a business process and define the parameters for the Release service to operate on.
Release Service Parameters
The following table describes the Release service parameter:
Parameter | Description |
---|---|
TARGET | The element(s) to remove from process data. Notes:
|
Usage Examples
The following are examples using the Release service using both the GPM and BPML.
Removing Temporary Variables from Process Data
The following example using BPML illustrates a business process that uses the Release service to remove temporary variables from process data.
After the assigns are processed, the process data looks like the following:
<ProcessData>
<TempVariables>
<Variable1>1</Variable1>
<Variable2>2</Variable2>
<Variable3>3</Variable3>
</TempVariables>
</ProcessData>
After the Release service is processed, the process data looks like the following, removing the temporary variables:
<ProcessData/>
The following example by using the GPM illustrates the same business process.
Removing a Primary Document Reference from Process Data
The following example illustrates a business process that uses the Release service to remove the primary document reference from process data.
The following document is input to the business process and becomes the primary document:
<Order Id="200">
<Customer Id="222">
<Name>John Doe</Name>
<Address>
<Street>888 Cherry Street</Street>
<City>Denver</City>
<State>CO</State>
<Zip>80265</Zip>
</Address>
<Phone>303-629-5555</Phone>
</Customer>
<Account Id="800">
<Customer_Id>555</Customer_Id>
<Name>XXX Account</Name>
<Type>Personal</Type>
<Contact>
<Name>Jane Doe</Name>
<Phone>720-555-1234</Phone>
</Contact>
</Account>
<Order_Item Id="400">
<Order_Id>100</Order_Id>
<Name>XXX</Name>
<Quantity>1</Quantity>
<Price>39.99</Price>
</Order_Item>
</Order>
The following example illustrates the business process by using BPML.
After the business process runs, the process data looks like the following, with a reference to the primary document:
<ProcessData>
<PrimaryDocument SCIObjectID="belushi:712b3a:fb0cd0a610:3255"/>
</ProcessData>
After the Release service is processed, the process data looks like the following, removing the reference to the primary document:
<ProcessData/>
The following example illustrates the business process by using the GPM:
Removing a Temporary Document from Process Data
- Loads a primary document into process data but maintains a reference to the original primary document.
- Removes the document from process data, keeping the original primary document reference in process data.
You might consider this approach when you want the business process to manipulate the data contained in the primary document and yet maintain the original primary document.
The document used in the previous example is input to the business process and becomes the primary document. See Removing a Primary Document Reference from Process Data for the input document.
The following example illustrates the business process using BPML:
After the business process runs and the assign statement is processed, the process data looks like the following:
<ProcessData>
<PrimaryDocument SCIObjectID="server1:712b3a:fb0cd0a610:35bd"/>
<TempDocumentHolder>
<Order Id="200">
<Customer Id="222">
<Name>John Doe</Name>
<Address>
<Street>888 Cherry Street</Street>
<City>Denver</City>
<State>CO</State>
<Zip>80265</Zip>
</Address>
<Phone>303-629-5555</Phone>
</Customer>
<Account Id="800">
<Customer_Id>555</Customer_Id>
<Name>XXX Account</Name>
<Type>Personal</Type>
<Contact>
<Name>Jane Doe</Name>
<Phone>720-555-1234</Phone>
</Contact>
</Account>
<Order_Item Id="400">
<Order_Id>100</Order_Id>
<Name>XXX</Name>
<Quantity>1</Quantity>
<Price>39.99</Price>
</Order_Item>
</Order>
</TempDocumentHolder>
</ProcessData>
After the Release service is processed, the process data looks like the following, with references to the original primary document and the temporary document removed:
<ProcessData>
<PrimaryDocument SCIObjectID="server1:712b3a:fb0cd0a610:35bd"/>
</ProcessData>
The following example illustrates the business process using the GPM:
Best Practices
- Organize the creation of elements in process data in a way that simplifies their removal. For example, use a wrapper element to enclose the elements you add to process data.
- Use one Release service to release multiple elements in process data by setting the TARGET parameter using a function like name (). The following example removes the three named elements from process data:
<assign to="TARGET">/ProcessData/TempDocumentHolder/Order/*[name()= 'Customer' or name()= 'Account' or name()= ' Order_Item']</assign>