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:
  • Freeing up the storage space used by elements being removed
  • Removing “clutter” from process data, making it easier to understand processing and debug problems
  • Reducing the size of process data, which can speed the execution of XPath functions that work on process data
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:
  • Success – If release is successful
  • Failure – If release is unsuccessful
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:
  • You must specify the TARGET parameter in all uppercase characters.
  • You can use either the Advanced Editor in the GPM or BPML to specify this parameter.
  • You can use the following formats to assign an element to the TARGET parameter.

    <assign to="TARGET">target_element_name</assign>

    where target_element_name is the name of the XML element you want removed from process data. The Use XPATH? option in the GPM is not selected when using constants to assign the TARGET parameter.

    or

    <assign to="TARGET" from=" 'xpath_statement' " />

    Notice that the xpath_statement is enclosed in both double quotes and single quotes. The Use XPATH? option in the GPM must be selected when using XPath statements to assign the TARGET parameter.

See Usage Examples for examples.

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.

Removing 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 Temporary Variables from Process Data

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.

Removing a Primary Document Reference from Process Data

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>
Note: If you click on the SCIObjectID, you see the actual primary document.

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 Primary Document Reference from Process Data

Removing a Temporary Document from Process Data

The following example illustrates a business process that does the following:
  • 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:

Removing a Temporary Document from Process Data

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:

Removing a Temporary Document from Process Data

Best Practices

This section lists some best practices to follow when using the Release service to increase the efficiency of your business process.
  • 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>