BEA Logo BEA Collaborate Release 2.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Collaborate Documentation   |   Workflows   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Ending Collaborative Workflows

 

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

 


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 Working with Workflow Components in Using the BEA WebLogic Process Integrator 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. The following sections describe the Done Properties dialog box for each supported protocol.

Done Properties Dialog Box for the XOCP 1.1 Protocol

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 Collaboration Termination property, the following message is displayed in the center of the Done Properties dialog box:

Not available for current collaboration settings

For information about terminating RosettaNet-based conversations, see Implementing RosettaNet for BEA WebLogic Collaborate.

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 Working with Workflow Components in Using the BEA WebLogic Process Integrator 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 WebLogic Process Integrator Boolean variable in which the termination status variable can be stored. This variable will be set to one of the values listed in the following table.

    Table 6-2 Terminate Status Options in the Event Properties Dialog Box

    Option

    Description

    True

    Indicates that the conversation was terminated with a SUCCESS value.

    False

    Indicates that the initiator terminated the conversation with a FAILURE value.


     

    Note: You must explicitly create this Boolean variable before selecting it in this dialog box. For more information, see About Working with WebLogic Process Integrator Variables for Workflows.

  6. Click OK to save your changes.

WebLogic Process Integrator assigns the value of the conversation termination status to a WebLogic Process Integrator Boolean variable, 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 WebLogic Collaborate-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 Using the BEA WebLogic Process Integrator Studio.

 

back to top previous page