Designing Business Processes in the Sun Business Process Manager

Building a Business Process Model

When developing a Business Process (BP), you first create and name a new BP in a Java CAPS Project, and then add modeling elements and other Java CAPS component operations to the BP canvas to develop a logical process flow. Like other objects, BPs appear in the Project Explorer. Perform the following steps to create a BP model.

Once you create the BP, you need to might configure the properties. Once you have finalized the BP, you need to create a Connectivity Map, Environment, and Deployment Profile. You can then deploy the Project to the server.

Adding a Business Process to a Project

The first step in creating a BP is to add a new BP to a Java CAPS Project.

ProcedureTo add a BP to a Project

  1. From the Project Explorer panel, right-click a Project.

  2. Point to New, and then select Business Process from the context menu.

  3. Enter a new name for the BP.

  4. Click Save.


    Note –

    See Sun Enterprise Service Bus topics for more information about creating a new Project.


Creating the Business Process Components

You create BP components by dragging, dropping, and linking the available modeling elements in the Business Process Designer.

Perform the following steps to create the components of a BP.

Adding Activities

There are several different kinds of activities you can include in a BP model. For more information about each of the different kinds of activities you can use and an illustration of their toolbar icons, see Business Process Activities.

ProcedureTo add activities

  1. Do one of the following:

    • On the Business Process Designer toolbar, click the activity icon and drag it to the canvas.

    • For intermediate or branching activities, click Intermediate Events or Branching Activities on the Business Process Designer toolbar, click the activity you want to use, and then drag it to the canvas.

  2. Click the activity name and type a new name for the activity. This is optional. You can accept the default name.


    Note –

    The activity name must contain at least one character (A-Z, a-z, or 0-9), it must start with a letter or an underscore (_), and it can contain spaces.


  3. Add Java CAPS components from the Project Explorer as described in Adding Components from the Project Explorer (optional).

  4. Link the activities as described in Linking Modeling Elements.

Adding Components from the Project Explorer

Elements from the Project Explorer can either be dropped directly onto the canvas or onto an activity. Many elements provide custom settings so you can model every detail of your process.

ProcedureTo add Project Explorer components

  1. In the Project Explorer, expand the tree until the element you want to add is visible.


    Note –

    Elements that can be added to a BP appear in the Project Explorer with a yellow rectangular icon, like the FileClient receive and write activities or Visual Page Designer show operations.


  2. Click the element and drag it to the Business Process Designer canvas.

  3. Link the modeling elements as described in Linking Modeling Elements.

Linking Modeling Elements

Links indicate the flow of the BP by connecting activities together. BPM does not allow invalid links, ensuring the model is properly linked. Links can also accept business rules. A link with a business rule is marked with a blue icon.

ProcedureTo link a modeling element

  1. Move your cursor over the connector portion of a modeling element.

  2. Hold the cursor over the outside edge of the modeling element until it changes from the arrow pointer to a hand.

  3. Drag a line from the first activity to the connector of the second activity, and then release the mouse.

  4. To change the link style, right-click the BP in the Project Explorer, and then click Toggle Link Style.

  5. Click Save.

  6. Add business rules to the links, as described in Incorporating Business Rules below (optional).

Incorporating Business Rules

You can configure logic in a business rule activity or add a business rule to a link. Business rules are defined using the Business Rule Designer, which appears when you click the Display Business Rule Designer icon or double-click a business rule activity or a business rule icon on a link. It is active when you add or select a link with a business rule and when you add or select a business rule activity. The Business Rules Editor, available from the Business Rule Designer, allows you to further modify business rules.

Adding Business Rules Activities

A business rule activity allows you to map and manipulate data in an activity in the Business Rule Designer.

ProcedureTo add a business rule activity

  1. From the Business Process Designer toolbar, click Business Rule Activity and drag it to the Business Process Designer canvas.

  2. On the Business Process Designer toolbar, click Display Business Rule Designer.

    The Business Rule Designer appears in the lower part of the Business Process Designer.

  3. Define the business rules for the activity as described in Defining Business Rules.

Adding a Business Rule to a Link

You can add a business rule to a link in order to map and manipulate data between activities using the Business Rule Designer.

ProcedureTo add a business rule to a link

  1. Right-click a link in the BP, and then click Add Business Rule.

  2. On the toolbar, click Display Business Rule Designer.

    The Business Rule Designer appears in the lower part of the Business Process Designer.

  3. Define the business rules for the activity as described in Defining Business Rules.

Defining Business Rules

A business rule can be a direct mapping of data, or can include multiple methods to manipulate data during the mapping.

ProcedureTo define a business rule

  1. In the Business Process Designer, double-click the business rule activity or link you want to edit.

    The Business Rule Designer appears.

  2. Expand the trees in the right and left panels until the nodes you want to map are visible.

  3. Do any of the following:

    • Drag a direct link between nodes in the right and left panels.

    • Select a method from the Method Palette. You can populate the method parameters and return values by linking them to nodes in the left and right panels, by linking them with additional methods, or by creating literal values.


      Note –

      See Using the Method Palette for more information about each method available in the Method Palette.


  4. When you are done creating business rules, click Save in the Enterprise Designer toolbar.

Editing Business Rules

Once you create business rules, you can modify them in the Business Rule Designer. You can also use the Business Rules Editor, provided with the Business Rule Designer, The editor provides an advanced view of the business rules for your BP

ProcedureTo edit business rules

  1. In the BP, double-click the business rule activity or business rule you want to modify.

  2. Do any of the following:

    • Add new mappings.

    • Incorporate new methods into the rules.

    • Delete an existing link by clicking the link and then pressing the Delete key (this cannot be undone).

  3. To modify rules in the Business Rules Editor, click the bottom gray triangle to the left of the Business Rule Designer title bar.

    The Business Rules Editor appears.

  4. By default, the rules are in read-only mode. Click Show Single Mapping to place the editor in edit mode.

  5. Do any of the following in the Business Rules Editor.

    • To delete a rule or set of rules, right-click the node and then click Delete. Use caution when deleting rules. This can result in modeling elements being removed from the BP and cannot be undone.

    • To activate the reset destination feature for a rule, right-click the rule, and then click Reset Destination (for more information about this feature, see Reset Destination).

      When you right-click the node again, Reset Destination appears with a check mark.

    • To deactivate the reset destination feature for a rule, right-click the rule, and then click Reset Destination.

      When you right-click the node again, Reset Destination no longer appears with the check mark.

    • To expand the tree nodes, right-click a node, and then click Expand, or click Expand All to expand all nodes.

    • To collapse a tree node, right-click the node, and then click Collapse.

    • To change the order of the rules, select the rule you want to move and then click either the down or up arrows in the toolbar until the rule is where you want it. You can only move a node if there a multiple nodes at the same level.

  6. To close the Business Rules Editor, click the top gray triangle to the left of the Business Rule Designer title bar.

  7. When you are done making changes, click Save in the Enterprise Designer toolbar.

Validating a Business Process Model

After creating a BP model, you can check to see if there are any errors or warnings in the processing code. Errors are critical issues and will stop the BP. For example, activities that are not connected or an incorrect number of output links from an activity will cause an error. Warnings appear when there is a problem, but it is not critical enough to stop the BP. For example, unused containers in a BP cause warnings, you can still build, deploy, and run the process.

ProcedureTo check the Business Process for errors or warnings

  1. On the Business Process Designer toolbar, click Validate Business Process Model.

    The Business Process Validation dialog box appears.

  2. If an error or warning is encountered, the dialog box displays information about the error or warning.

  3. If there are multiple errors or warnings, the Next button is enabled, allowing you to view information for each additional error or warning.

  4. If there are no errors or warnings, a message appears stating so.

  5. After you have reviewed any error messages, click Close.

Saving a Business Process Model

Even if a BP model is not complete or contains errors, you can save it as a “work in progress” and return to it later.

ProcedureTo save a BP model

  1. Do one of the following:

    • Press Ctrl+s on the Keyboard

    • On the Enterprise Designer main menu, click File, and then click Save

    • On the Enterprise Designer toolbar, click Save.