Mailbox Delete Mailbox Service
The Mailbox Delete Mailbox service deletes one or multiple mailboxes, plus the submailboxes, messages, virtual roots, routing rules, and permissions. This service completely and permanently removes mailboxes and everything associated with the deleted mailboxes.
The following table provides an overview of the Mailbox Delete Mailbox service:
Category |
Description |
---|---|
System Name |
Mailbox Delete Mailbox Service |
Graphical Process Modeler (GPM) categories) |
Internet B2B, Mailbox |
Description |
This service deletes one or multiple mailboxes. |
Business usage |
A business user uses this service to delete mailboxes that meet specific criteria. |
Usage example |
Dolnet currently has 100 trading partners defined in the Sterling B2B Integrator system that exchange data with the company. Each trading partner has its own mailbox and unique way of transferring data. Dolnet has decided to stop any further transactions with one of the trading partners, Vialore, and must now modify Sterling B2B Integrator such that Vialore can no longer exchange data with Dolnet. As part of this change, the Vialore mailbox must be deleted. The Mailbox Delete Mailbox service is used in a business process to delete the Vialore mailbox. |
Preconfigured? |
No |
Requires third-party files? |
No third-party files are required. |
Platform availability |
All supported Sterling B2B Integrator platforms |
Related services |
This service also works with the other Mailbox services to provide a mailbox capability to Sterling B2B Integrator. The related services are:
|
Application requirements |
Nothing external to Sterling B2B Integrator is required for the use of this service. |
Initiates business processes? |
No |
Invocation |
A user with the Mailbox Global Delete permission (obtained through the addition to a User Account or Group through the Accounts page) must execute the business process invoking this service. |
Business process context considerations |
The Mailbox Global Delete permission ensures that the business process is authorized to access the referenced mailboxes. |
Returned status values |
Possible status values that can be returned from this service are:
|
Restrictions |
The limitations of this service are based on the assignment of the Mailbox Global Delete permission. |
Testing considerations |
Debug information for this service can be found in the mailbox log files. |
How the Mailbox Delete Mailbox Service Works
- Starting with the originally passed list of mailboxes to delete, the Mailbox Delete Mailbox service recursively adds each underlying submailbox until every mailbox in the hierarchy is represented.
- Then for each mailbox, the service deletes all contained messages, the permission, all of the permission associations to users or groups, virtual roots, routing rules, and the mailbox itself.
- If there are multiple mailboxes in the routing rule, the deleted mailbox is removed from the rule, otherwise the rule will be deleted.
- All operations are performed together as a group, all or nothing. If any part fails, no changes are made by the service and an error is returned.
Implementing the Mailbox Delete Mailbox Service
- Obtain Mailbox Global Delete permission, through the addition to a User Account or Group in the Accounts page.
- Create a configuration of the Mailbox Delete Mailbox service. For basic information about creating service configurations, see Managing Services and Adapters. For information about the fields specific to this service, see Configuring the Mailbox Delete Mailbox Service.
- Add the provided Mailbox Delete Mailbox service configuration to a business process.
- Test and run the business process.Note: A preconfigured Mailbox Delete Mailbox service is also provided.
Configuring the Mailbox Delete Mailbox Service
You must specify field settings in the Admin Console and the Graphical Process Modeler.
Creating a Service Configuration in the Admin Console
Use the field definitions in the following table to set up the configuration provided with Sterling B2B Integrator.
Field | Description |
---|---|
Name |
Unique and meaningful name for the service configuration. Required. |
Description |
Meaningful description for the service configuration, for reference purposes. Required . |
Select a Group |
Select one of the options:
Tip: For more information about service groups, see Managing Services and
Adapters.
|
Defining the Service in the GPM
Use the field definitions in the following table to set up the service configuration in the GPM:
Parameter |
Description |
---|---|
Force |
Whether a mailbox delete should be forced when the mailbox contains submailboxes or messages.
Optional. Valid values are:
|
MailboxPath |
Mailbox path that you would like to delete. If you have a virtual root, then
MailboxPath is a relative path to the virtual root. The virtual root is not
visible to the business process. Valid value is a UNIX path where the folders correspond to a
mailbox hierarchy. The path must begin with the / character and use the / to delimit mailboxes in
the hierarchy. The space character is permitted in the middle of a mailbox name, and the following
characters are not permitted in a mailbox name:
If the mailbox that you are deleting is a Global Mailbox, set UseGlobalMailboxes = Yes. Tip: This element can be repeated to delete multiple mailboxes.
|
UserId |
Do not use.
Restriction: The UserId parameter has no effect on
this service and is unsupported. The service always uses the user ID that is running the business
process.
|
UseGlobalMailboxes |
Whether to use only Global Mailbox or only traditional Sterling B2B Integrator mailboxes. The following values are valid:
|
Business Process Examples
The following example shows how the Mailbox Delete Mailbox service can be used in a business process.
Business Scenario
Dolnet currently has 100 trading partners defined in the Sterling B2B Integrator system that exchange data with the company. Each trading partner has its own mailbox and unique way of transferring data. Dolnet has decided to stop any further transactions with one of the trading partners, Vialore, and must now modify Sterling B2B Integrator such that Vialore can no longer exchange data with Dolnet. As part of this change, the mailbox for Vialore must be deleted. The Mailbox Delete Mailbox service is used in a business process to delete the Vialore mailbox.
This is the BPML for the business process:
<process name="MailboxDeleteMailboxProcess">
<sequence name="MailboxDeleteMailboxSequence">
<operation name="Mailbox Delete Mailbox Service">
<participant name="MailboxDeleteMailbox"/>
<output message="DeleteRequest">
<assign to="MailboxPath">/VialoreMailbox</assign>
<assign to="Force">Yes</assign>
<assign to="." from="*"></assign>
</output>
<input message="DeleteResponse">
<assign to="DeleteResponse" from="*"></assign>
</input>
</operation>
</sequence>
</process>
Business process for Global Mailbox
This is the BPML for the business process when the mailbox that will be deleted is a Global Mailbox:
<process name="MailboxDeleteMailboxProcess">
<sequence name="MailboxDeleteMailboxSequence">
<operation name="Mailbox Delete Mailbox Service">
<participant name="MailboxDeleteMailbox"/>
<output message="DeleteRequest">
<assign to="MailboxPath">/Vialore1</assign>
<assign to="MailboxPath">/Vialore2</assign>
<assign to="Force">yes</assign>
<assign to="UseGlobalMailboxes">yes</assign>
<assign to="." from="*"></assign>
</output>
<input message="DeleteResponse">
<assign to="DeleteResponse" from="*"></assign>
</input>
</operation>
</sequence>
</process>
Parameters Passed From Service to Business Process
The following table contains the parameters passed from the Mailbox Delete Mailbox service to the business process:
Parameter |
Description |
---|---|
DeleteResponse |
Specifies all resources deleted as a result of operation of the service, including mailboxes, submailboxes, messages, permissions, virtual roots, and routing rules. |
Following is an example of DeleteResponse in the process data:
<?xml version="1.0" encoding="UTF-8"?>
<ProcessData>
<DeleteResponse>
<Mailbox>
<MailboxId>11</MailboxId>
<MailboxPath>/MyMailbox</MailboxPath>
</Mailbox>
<Mailbox>
<MailboxId>12</MailboxId>
<MailboxPath>/MyMailbox/MyMailboxSub</MailboxPath>
</Mailbox>
<Message>
<MessageId>9</MessageId>
<MessageName>delta.txt</MessageName>
</Message>
<Message>
<MessageId>10</MessageId>
<MessageName>delta2.txt</MessageName>
</Message>
<Permission>
<PermissionName>/MyMailbox.mbx</PermissionName>
</Permission>
<Permission>
<PermissionName>/MyMailbox/MyMailboxSub.mbx</PermissionName>
</Permission>
<Rule>
<RuleId>4f06da5c:1057842a730:2327</RuleId>
</Rule>
<VirtualRoot>
<UserId>jane_doe</UserId>
</VirtualRoot>
</DeleteResponse>
</ProcessData>