Mailbox Extract Commit Service

The Mailbox Extract Commit service indicates the successful completion of the extraction of a message from a mailbox.

The following table provides an overview of the Mailbox Extract Commit service:

Category Description

System name

Mailbox Extract Commit Service

Graphical Process Modeler (GPM) categories

All Services, Internet B2B > Mailbox

Description

Indicates the successful completion of the extraction of a message from a mailbox.

Business usage

A trading partner would use this service to indicate the successful completion of a unit of work.

Usage example

After all purchase orders are extracted from the mailbox and successfully delivered to the SAP adapter for back-office processing, the message extractability count is permanently decremented.

Preconfigured?

Yes

Requires third-party files?

No

Platform availability

All supported application platforms

Related services

The Mailbox Extract Commit service works with the other Sterling B2B Integrator Mailbox services to provide mailbox capability:
  • Mailbox Add service – Enables the insertion of messages into a mailbox.
  • Mailbox Extract Begin service – Enables the extraction of messages from a mailbox.
  • Mailbox Extract Abort service – Enables a business process to signal a failed message extraction to Sterling B2B Integrator Mailbox.
  • Mailbox Query service – Enables querying messages.
  • Mailbox Delete service – Enables deletion of messages.
  • Mailbox Evaluate All Automatic Rules service – Provides for the scheduling of automatic routing rules for Sterling B2B Integrator Mailbox.
  • Mailbox Evaluate Routing Rule service – Enables triggering of mailbox routing rules from a business process.

Application requirements

Nothing external to Sterling B2B Integrator is required to use this service.

Initiates business processes?

No

Invocation

The business process using this service must have already performed a Mailbox Extract Begin on the target message.

Business process context considerations

The business process ID and branch ID must match the business process ID and branch ID that performed the Mailbox Extract Begin.

Returned status values

The possible status values a service can return are:
  • Success – Normal completion.
  • User Permission Error – The user associated with the business process does not have permission to use the target mailbox.
  • Invalid Mailbox Error – Indicates changes in the assignment of virtual mailbox roots, which would disallow the extract process.
  • Invalid Mailbox Parameter Error – An error occurred passing parameters to this service such as a message ID in an invalid format.
  • Message Not Found Error – The requested message cannot be found for extraction.
  • Message Not Extractable Error – The target message's extraction policy forbids extraction.
  • Mailbox Extract Invalid State Error – The current business process has not performed an Extract Begin.
  • Mailbox Repository Error – A generic error associated with the mailbox repository occurred.
  • Mailbox Service Error – A generic error associated with the mailbox service occurred.

Restrictions

The Mailbox Extract Begin service must be called before this service. Additionally, the calling business process instance must be the same instance that called the Mailbox Extract Begin service.

Testing considerations

Troubleshooting information for this service can be found in Sterling B2B Integrator Mailbox log files.

How the Mailbox Extract Commit Service Works

Use the Mailbox Extract Commit service to complete the extraction of a message from a mailbox that was started by the Mailbox Extract Begin service. This service releases the message that was locked by the Mailbox Extract Begin service. To use this service in your business process, you must include all three services: the Mailbox Extract Begin service, Extract Abort service, and Extract Commit service.

Business Process Example

The following BPML commits the extraction of message 1234 from Sterling B2B Integrator Mailbox. If it is assumed message 1234 was successfully extracted by business process ID=789, branch ID=456. The BPML will succeed if run by a business process with ID=789 and branch ID=456.

<operation name="Mailbox ExtractBegin Service">
       <participant name="MailboxExtractBegin"/>
           <output message="ExtractBeginRequest">
               <assign to="." from="*"></assign>
               <assign to="MessageId">1234</assign>
            </output>
             <input message="inmsg">
                 <assign to="." from="*"></assign>
            </input>
    </operation> 
<!-- Commit Extract Operation. -->
    <operation name="Mailbox ExtractCommit Service">
       <participant name="MailboxExtractCommit"/>
           <output message="ExtractCommitRequest">
               <assign to="." from="*"></assign>
               <assign to="MessageId">1234</assign>
          </output>
           <input message="inmsg">
               <assign to="." from="*"></assign>
           </input>
   </operation>

Implementing the Mailbox Extract Commit Service

To implement the Mailbox Extract Commit service for use in a business process:
  1. Create a Mailbox Extract Commit service configuration. For information, see Managing Services and Adapters.
  2. Configure the Mailbox Extract Commit service. For information, see Configuring the Mailbox Extract Commit Service.
  3. Use the Mailbox Extract Commit service in a business process.

Configuring the Mailbox Extract Commit Service

To configure the Mailbox Extract Commit service, you must specify settings for the following fields in the GPM:

Field Description

Config

Name of the adapter configuration.

MessageID

ID of the stored message. Required. Valid values are numbers >=0 in traditional mailboxes and in UUID format in Global Mailbox.

UseGlobalMailboxes

Whether to use only Global Mailbox or only traditional Sterling B2B Integrator mailboxes. The following values are valid:
  • Yes - The Global Mailbox is used. The UseGlobalMailboxes parameter is displayed in the business process XML, with the value set to YES.
  • No (default) - The Global Mailbox is not used. The UseGlobalMailboxes parameter is displayed in the business process XML, with the value set to NO.

Output from Service to Business Process

The following table contains the parameter passed from the Mailbox Extract Commit service to a business process:

Parameter Description

MessageID

ID of the stored message.