Configuring Java CAPS Business Processes

Configuring Modeling Element Properties

Many modeling element properties are automatically defined for you as you build a Business Process. Once you have all your modeling elements in place, view the property sheets for the elements to be sure they are configured correctly. The property sheets are accessed through the Show Property Sheet tool on the Business Process Designer toolbar, and the properties appear to the right of the Business Process.

Table 1 lists and describes all of the properties that appear on the properties sheet, but different types of elements have different combinations of properties. Some properties do not appear for certain elements, some properties are read-only for certain elements, and not all properties are required.

Table 1 Activity and Link Properties

Property 

Description 

Name

The name of the selected element. 

Properties

For decision elements only, opens the Decision Gate Properties dialog box, which allows you to view and modify the logic for the decision activity.

Timeout

For wait activities only, opens the Timeout dialog box, which allows you to set timeout periods based on deadline or duration.

Priority

For user activities only, the priority of the activity. 

Task Type

For user activities only, the type of task. If you change the name of the activity, this value is automatically updated to match.

If Expression Evaluation Fails

For while elements only, an action to perform when the while loop fails. You can specify to throw an exception, return Boolean true, or return Boolean false.

Scope

For compensation elements only, the name of the scope with which the compensation element is associated.

Partner

The name of the partner to associate with the activity.

Port Type

The name of the port type for the specified partner. This field is disabled for some activities.

Operation

The type of operation associated with the port type. This field is disabled for some activities. 

Exception Name

The name of the exception to throw for the element. You can select from a list of exception names (exceptions must be predefined for the Business Process). 

Input

The name of the attribute containing the input for the activity.

Output

The name of the attribute containing the output for the activity. 

Create Instance

For receive activities and event-based decisions only, an indicator of whether to create a new instance for the activity.

Use Correlations

An indicator of whether to use a correlation set for the activity. Use the dialog box for this property to bind a correlation set to the activity (for more information, see Defining Message Correlations).

Transaction Support

An indicator of whether and how the activity is defined for transactional (XA) support. Select one of the following options:

  • Participates - The activity is part of a Business Process that is configured for XA support, and is itself configured for XA support. Use this option for invoke activities only.

  • XA - The activity is configured for XA support in a Business Process that is not configured for XA support. Use this option for receive and invoke activities and message-based events.

    Leave this property blank if XA transactions are not supported. For more information, see Configuring Business Processes for XA Transactions.

Pass By Value

An indicator of whether the activity attributes are passed by value or passed by reference. 

Alert Properties

Accesses the Specify Alerts dialog box, which allows you to define specific alerts for the modeling element. For more information, see Adding Alerts to a Modeling Element.

Logger Properties

Opens the Specify Log Messages dialog box, which allows you to define specific logger messages for the modeling element. For more information, see Adding Logger Messages to a Modeling Element.

Adding Logging and Alerts to an Element

You can initiate custom logging and alert entries from a Business Process modeling element. These entries can then be viewed in the logging and alerts pages for the Business Process in Enterprise Manager.

Adding Alerts to a Modeling Element

Java CAPS allows you to initiate alert entries from a Business Process element. You can define the following types of alerts (from most to least severe): critical, major, minor, warning, and information. The alert nodes take a Boolean data type, but you can specify that the data types be automatically converted when you define the mapping.

ProcedureTo add an alert to a modeling element

  1. Open the Business Process containing the element to which you want to add an alert entry.

  2. In the Business Process Designer, select the element.

  3. In the Business Process Designer toolbar, click Property Sheet.

    The properties for the element appear to the right of the Business Process.

  4. Click in the Alert Properties field, and then click the ellipsis (...).

    The Specify Alerts dialog box appears.

  5. Define the alert using the available methods.

  6. When you are finished defining the alert, click OK.

Adding Logger Messages to a Modeling Element

Java CAPS allows you to initiate logging entries from a Business Process element. You specify one of the log4j log levels: FATAL, ERROR, WARN, INFO, or DEBUG. When you view the log entries in Enterprise Manager, these log levels are converted to the corresponding JDK log levels. Table 2 describes the log level mapping from most to least severe.

Table 2 log4j to Java Log Level Mapping

log4j Log Level

JDK Log Level

FATAL

SEVERE

ERROR

SEVERE

WARN

WARNING

INFO

INFO

DEBUG

FINE

The logger level nodes take a Boolean data type, but you can specify that the data types be automatically converted when you define the mapping.

ProcedureTo add a logger message to a modeling element

  1. Open the Business Process containing the element to which you want to add a logger entry.

  2. In the Business Process Designer, select the element.

  3. In the Business Process Designer toolbar, click Property Sheet.

    The properties for the element appear to the right of the Business Process.

  4. Click in the Logging Properties field, and then click the ellipsis (...).

    The Specify Log Messages dialog box appears.

  5. Define the log message using the available methods.

  6. When you are finished defining the log message, click OK.

Configuring Business Processes for XA Transactions

Distributed Transaction Processing (DTP), more commonly known as XA, is a proposed W3C standard for keeping multiple transaction system components secure during short-lived and long-lived distributed transactions. This helps to ensure the integrity of distributed transactions.

XA transactions fall into two broad categories: short-lived and long-lived. A short-lived XA transaction is simpler, quicker, and requires fewer system resources than a long-lived transaction, but it remains Atomic, Consistent, Isolated, and Durable (ACID) throughout the transaction. A long-lived XA transaction is generally more complex, more distributed, and longer-running. In BPM, short-lived XA generally applies to a whole Business Process (whole Business Process XA), and long-lived XA generally applies to an individual Business Process activity (activity-level XA).

This section provides details and procedures for enabling XA support for whole Business Process XA as well as activity-level XA using BPM. For details about getting started using XA, see http://www.w3.org.

Enabling XA Support for a Whole Business Process

Whole Business Process XA for a Business Process is configured from the General page of the Business Process Properties dialog box. The following procedure provides the steps for enabling whole Business Process XA.

ProcedureTo enable XA transactions for a whole Business Process

  1. In the Project Explorer, right-click a Business Process and then click Properties.

    The Business Process Properties window appears with the General page displayed.

  2. In the Enable XA for Entire Business Process drop-down list, click Yes.

  3. Click OK.

  4. In the Business Process Designer toolbar, click Show Property Sheet.

  5. In the Business Process Designer, click an invoke activity.

  6. In the Transaction Support property of the property sheet, select Participates.

  7. Repeat steps 5 and 6 for any other invoke activities in the Business Process.


    Note –

    If you do not need to use persistence for other Business Processes in your Project, you do not need to enable XA for the entire Business Process.


Enabling XA Support for an Individual Activity

BPM allows you to enable XA at the activity level for your Business Process. This is handled in the property sheet of any receive activity, invoke activity, or pick activity (OnMessage). The following procedure provides the steps for enabling activity-level XA.


Note –

In order to enable activity-level XA, you must deploy the Business Process using persistence.


ProcedureTo enable a XA transactions for an individual activity

  1. In the Business Process Designer toolbar, click Show Property Sheet.

  2. Select a receive activity, invoke activity, or pick activity (OnMessage).

  3. In the Transaction Support property on the property sheet, select XA.

  4. For each activity to be XA-enabled, repeat steps 2 and 3.