BEA Logo BEA WLI Release 2.1

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

 

   WLI Doc Home   |   B2B Topics   |   Creating Workflows   |   Previous Topic   |   Next Topic   |   Contents   |   Index   |   View as PDF

Defining Conversation Properties for Workflow Templates

 

The following sections describe how to define templates and template definitions for workflows that implement roles in conversation definitions:

 


About Using the B2B Integration Plug-In to Define Templates

To create workflows for conversation roles in WebLogic Integration, you use the B2B integration plug-in. The first step in creating these workflows is defining workflow templates and template definitions for those workflows. In addition to the standard properties for templates and template definitions described in Defining Workflow Templates in Using the WebLogic Integration Studio, you must define additional properties not described in that document that allow the workflows based on those template definitions to be used in conversations.

For example, suppose you link a workflow template definition to a particular role in a conversation definition and version that is bound to a collaboration agreement in the WebLogic Integration repository. You must also define some additional attributes, such as the protocol to which the conversation role implemented by the workflow is bound, and additional configuration data that might be required by the protocol.

For general information about defining workflow templates, see Defining Workflow Templates in Using the WebLogic Integration Studio.

 


About Templates and Template Definitions

The topic Defining Workflow Templates in Using the WebLogic Integration Studio contains a comprehensive discussion about templates and template definitions, specifically about the differences between the types of information you provide in the template and the template definition.

The only data required in a template definition that you cannot define in a template is the expiration date and whether the template definition is active. However, it is good practice to set all conversation properties in the template, such as the following:

Then, when you create a template definition, you have the flexibility of overriding any conversation properties defined in the template, as appropriate. However, the primary advantage to assigning these properties in the template instead of the template definition is that you can specify properties for all template definitions contained in a given template.

Notes: Due to a limitation in WebLogic Integration, template properties are not exported when you export a template definition. That is, the properties that a template definition inherits from a template are not exported. You should consider your export requirements when you determine the properties to define in a template versus a template definition.

Template definition properties are exportable, but are specific to only one template definition.

The sections that follow show how to define conversation properties in the template; however, it is possible to define all these properties in the template definition, instead.

 


Creating a Workflow Template

To create a workflow template in the Studio using the B2B integration plug-in, complete the following steps:

  1. Do one of the following:

  2. Right-click the template name and select Properties from the pop-up menu to display the Template Properties dialog box, shown in the following figure.

    Figure 2-1 Template Properties Dialog Box


     

  3. Complete the fields on the General page, as described in Defining Workflow Templates in Using the WebLogic Integration Studio.

  4. Click OK to save your changes.

 


Linking Templates to Conversations

Before you use a collaborative workflow to exchange business messages in WebLogic Integration, you must first link the workflow template to a particular conversation definition (a conversation name, version, role, and protocol) in the repository.

To link a workflow template to a conversation definition:

  1. Open the Template Properties dialog box, as described in Creating a Workflow Template.

  2. In the Template Properties dialog box, select the B2B Integration tab, shown in the following figure.

    Figure 2-2 B2B Integration Page


     

  3. Complete the following fields on the page titled Conversation.
     

  4. Click OK to save your changes.

 


Linking Templates to Collaboration Protocols

In general, linking a template to a specific protocol affects what you see in many of the B2B integration plug-in dialog boxes and tabs throughout the Studio. As this document explains how to use various components of the B2B integration plug-in to perform various tasks, such as defining workflow start properties, sending and receiving business messages, and terminating conversations, you will see how the appearance of each plug-in component varies, depending on the protocol chosen for the workflow template.

For example, Table 2-1 explains that if you choose the XOCP protocol while configuring a workflow template, an additional tab is displayed in which you can specify Quality of Service (QoS) settings for business messages exchanged in workflows based on that template.

With respect to linking a template to a protocol, do the following:

Defining the Quality of Service for XOCP Message Delivery in the Workflow Template

The Quality of Service (QoS) is a set of attributes that are defined for reliable business message publishing. You can set QoS attributes only for business messages sent via the XOCP protocol.

In the Studio, you can define the QoS in the following:

To specify the Quality of Service in the workflow template:

  1. Select the tab labeled QoS, shown in the following figure.

    Figure 2-3 Quality of Service Properties Page


     
     

  2. Complete the following fields on the Quality of Service page.

    Table 2-2 Quality of Service Properties

    Field

    Description

    Delivery Confirmation

    Degree to which message delivery confirmation is required: Up to XOCP Hub (the default), Up to XOCP Hub Router, or All Destinations. Your selection determines which options are available in the Message Token Assignments dialog box, as described in Assigning Message Token Information to Workflow Variables.

    You can choose one of the following values:

    Durability

    If you select the box labeled Message Persistence, messages are saved in a persistent state. This option increases the likelihood of recovery from a system failure but requires additional processing that might affect run-time performance.

    If Message Persistence is not selected, messages are not saved in a persistent state. This option improves run-time performance but reduces the likelihood of recovery from a system failure.

    Number of Retries

    Maximum number of retries for sending a message (default is 0). The WebLogic Integration process engine repeatedly attempts to send a message until it either successfully sends the message or exceeds the maximum number of retries. An exception is thrown if the maximum number of retries is exceeded.

    Correlation ID

    Message identification string that can be used to correlate the message with other business messages in the application (default is none). For example, a trading partner might want to specify a correlation ID in a request so that replies to that request can be matched to the original request. The B2B messaging service includes this property with the message.

    Send Timeout

    Timeout value in days, hours, minutes, and seconds for sending a message (default is 0, which means no timeout). The WebLogic Integration process engine waits until either a delivery confirmation is received or the timeout period is exceeded.

    Notes

    Optional descriptive text.


     

  3. Click OK to save your settings.

 


Logging Messages

The B2B integration plug-in provides a means to send messages— for example, debug messages, run-time information, or application messages—to the B2B log at any point during the execution of a collaborative workflow. This functionality is provided via the Log action, which you can add to any node in the workflow. This action can provide a useful debugging tool during the workflow design process.

To add a Log action to a node in the workflow, complete the following steps:

  1. Open the workflow in which you want to add the Log action, making sure that the workflow is active and not expired.

  2. In any dialog box where you can specify an action, click Add to display the Add Action dialog box.

    Figure 2-4 Add Action Dialog Box


     

  3. Click the Integration Actions folder to expand it.

    Figure 2-5 Add Action Dialog Box with Workflow Actions


     

  4. Click the B2B Integration folder to expand it.

  5. Select Log. The Log action dialog box is displayed.

    Figure 2-6 Log Action Dialog Box


     

  6. Enter the message you want to send to the B2B log, or use the Expression Builder to build the message to be sent to the log. For information about using the Expression Builder, see Using Workflow Expressions in Using the WebLogic Integration Studio.

 


About Using Workflow Variables

A workflow variable is typically used to store application-specific information required by the workflow at run time. Variables are created and assigned values largely to control the logical path through a workflow instance. The same workflow template definition is instantiated multiple times and can be traversed in different ways if the flow contains decision nodes.

The guidelines for working with variables that apply to noncollaborative workflows also apply to collaborative workflows. (They are fully explained in Using the WebLogic Integration Studio.) When creating workflows, keep the following guidelines in mind:

Note: Applications that start workflows programmatically must use the Message Manipulator API (package com.bea.b2b.wlpi). For more information, see Developing Applications that Start Conversation Initiator Workflows.

Associations Between Workflow Variables and Java Data Types

If you want to access a workflow variable within a business operation, you need to know how workflow variable types correspond to Java data types. The following table shows how they are related.

Table 2-3 Workflow Variables and Java Data Types

Workflow Variable Type

Java Data Type

String

java.lang.String

Integer

java.lang.Long

Double

java.lang.Double

Date

java.util.Date

Boolean

java.lang.Boolean

Complex Object

java.lang.Object

(must implement Serializable)

XML

org.w3c.dom.Node


 

Rules for Defining Workflow Variables

The rules for defining Workflow variables for collaborative workflows are the same as those for noncollaborative workflows:

Defining Variables

For complete details about defining workflow variables in the Studio, see Using Workflow Expressions in Using the WebLogic Integration Studio.

 

back to top previous page next page