bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Creating Workflows

 Previous Next Contents Index View as PDF  

Ending Collaborative Workflows

The following sections describe key tasks associated with ending collaborative workflows:

Note: Most of the features described in this chapter are based on the XOCP business protocol, which is deprecated as of this release of WebLogic Integration. For more information about terminating conversations based on the RosettaNet protocol, see Implementing RosettaNet for B2B Integration. For information about ending workflows based on the ebXML protocol, see Implementing ebXML for B2B Integration. For information about the business protocol that is replacing XOCP, see the BEA WebLogic Integration Release Notes.

 


Defining Conversation Termination

A conversation is terminated when the conversation initiator workflow reaches a done state. Conversation participant workflows can end their participation in a conversation before the conversation is terminated.

Defining the Termination of Conversation Initiator Workflows

For a conversation initiator workflow, you can define the conversation termination property (terminate with success or failure) for any done node in the workflow. Once a done node is reached in the workflow, the running instance of the workflow is marked done, regardless of whether the active workflow has reached all the done nodes. A conversation initiator workflow can terminate a conversation, but other participants in the conversation cannot.

To define the termination for a conversation initiator workflow:

  1. Add or view a done shape, as described in Defining Workflow Templates in Using the WebLogic Integration Studio.

  2. Double-click the done shape or right-click it in the folder tree. Select Properties to display the Done Properties dialog box.

    Figure 6-1 Done Properties Dialog Box


     

  3. Click Custom. A drop-down list for each of the plug-ins installed in the Studio is displayed.

    Figure 6-2 Custom Done Properties Drop-Down List


     

  4. Select Collaboration Termination.

What you see in the Done Properties dialog box depends on the protocol defined for the workflow template.

Done Properties for Each Supported Protocol

The following sections describe the Done Properties dialog box for each supported protocol:

Done Properties Dialog Box for the XOCP 1.1 Protocol (Deprecated)

For workflow templates defined for the XOCP 1.1 protocol, the Done Properties dialog box appears as shown in the following figure after you have chosen a custom Done property using the Conversation Termination property.

Figure 6-3 Done Properties Dialog Box for the XOCP 1.1 Protocol


 

Select a conversation termination option in the Done Properties dialog box.

Table 6-1 Exchange Termination Options in the Done Properties Dialog Box  

Field

Description

Success

Select this option if the conversation should be terminated with a SUCCESS result (default). The conversation is terminated after the actions for this state are done.

The SUCCESS result indicates that the workflow instance completed successfully. The participants of the conversation are notified (if possible) that the conversation is being terminated.

Failure

Select this option if the conversation should be terminated with a FAILURE result. The conversation is terminated after the actions for this state are done.

The FAILURE result indicates that the workflow instance encountered conversation-specific or application-specific errors. The participants of the conversation are notified (if possible) that the conversation is being terminated.


 

Done Properties Dialog Box for the RosettaNet 1.1 or 2.0 Protocols

If your workflow is configured with the RosettaNet 1.1 or 2.0 protocol, conversation termination is not handled in the Done node of the workflow. If you select the Conversation Termination property, the following message is displayed:

This feature is not available for the current conversation settings

For information about terminating RosettaNet-based conversations, see Implementing RosettaNet for B2B Integration.

Defining the End of Conversation Participant Workflows

A conversation participant workflow has defined conversation properties, a Business Message start property, and (optionally for XOCP-based workflows) a Conversation Terminate event. The Conversation Terminate event may be used in a participant workflow to wait for a conversation termination signal from the conversation initiator. It allows a participant workflow to perform additional processing (such as housekeeping operations) based on the status of the conversation termination.

Note: The use of this event is optional, and it is relevant only to the XOCP protocol. A workflow that does not wait for this event can leave the conversation by simply ending the workflow (a Done node).

A workflow event shape represents a notification node. The workflow waits for a conversation termination message to trigger the event. Upon that trigger, actions defined within the event can be executed and/or workflow variables can be set.

To add a Conversation Terminate event to a conversation participant workflow:

  1. Display or add an event shape as described in Defining Workflow Templates in Using the WebLogic Integration Studio.

  2. Double-click the event shape or right-click it in the folder tree. Select the Properties command to display the Event Properties dialog box.

    Figure 6-4 Event Properties Dialog Box


     

  3. Enter text in the Description field, and select Conversation Event from the Type drop-down list.

    Figure 6-5 Choosing a Collaboration Event


     

    After you have selected Conversation Event as the event type in the Event Properties dialog box, the display of the Event Properties dialog box is refreshed as shown in the following figure.

    Figure 6-6 End of Conversation Collaboration Event for the XOCP 1.1 Protocol


     

  4. In the Event Type selection box, select Conversation Termination.

  5. Select a workflow variable of type Boolean in which the termination status variable can be stored. This variable will be set to one of the values listed in the following table.


     

    Note: You must explicitly create this Boolean variable before selecting it in this dialog box. For more information, see About Using Workflow Variables.

  6. Click OK to save your changes.

The Studio assigns the value of the conversation termination status to a workflow variable of type Boolean, which can be accessed by the workflow or passed to a business operation. The developer of the workflow should take appropriate actions based on this value.

 


Defining Workflow End

All collaborative workflows require at least one done node. For conversation initiator workflows, defining the done node is explained in Defining the Termination of Conversation Initiator Workflows. For conversation participant workflows, receiving a conversation termination event is entirely separate from defining the end of the workflow. Typically, conversation participant workflows have at least one done node that simply ends the workflow. There are no B2B-specific actions or events that can be configured in the done node of conversation participant workflows, regardless of protocol.

As mentioned in Defining the End of Conversation Participant Workflows, conversation participant workflows do not need to handle a conversation termination event. These workflows can simply end, and when they do, they are automatically separated from the conversation in which they were participating.

For more information about configuring Done nodes, see Defining Workflow Templates in Using the WebLogic Integration Studio.

 

Back to Top Previous Next