IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Building services > Building a Decision service > Adding and modifying Decision service variables

Adding variable types and business objects to a Decision service

In IBM BPM, you can create a custom business object (variable type) for the Decision service. The variable type becomes part of the data for the process application, and is available for all business process definitions (BPDs) and services included in the process application.

To create a custom business object (variable type), you must have write access to a process application or toolkit in the Process Center repository. Access to process applications and toolkits is controlled by users who have administrative rights to the repository.


Procedure

To add a business object (variable type) to a Decision service, complete these steps:

  1. You can add a variable type from the Process Designer library panel, or from the Variables tab while you are working in the Rule service.

    • To add a business object from the Process Designer library panel:

      1. Click the indicator next to the process application name in the library panel to see the categories of library items in the current process application.

      2. Click the plus sign next to the Data library item.

      3. In the Create New window, click Business Object.

      4. In the New Business Object window, type a name for the variable type, then click Finish.
      5. Follow the procedure steps to define the new business object (variable type).

    • To add a variable type while working in the Decision service:
      1. Make sure you are working in the Decision service where you want to add the new variable type.

      2. Click the Variables tab.

      3. Create a new variable, or select the variable where you want to add the new variable type. For more information about adding variables, refer to the related topic "Adding and modifying Decision service variables."

      4. In the Details section, click New next to the Variable Type field.

      5. In the New Business Object window, type a name for the variable type, then click Finish.
      6. Follow the procedure steps to define the new business object (variable type).

  2. In the Behavior section, select a Definition Type from the list.

    • Select Simple Type to create a new variable type using an existing type such as String, Decimal, or Integer. For more information about creating simple variable types, refer to the related topic "Creating custom variable types."

    • Select Complex Structure Type to create a new complex variable type. You can create a custom variable type by adding parameters and parameter properties to the business object. For more information about creating complex variable types, refer to the related topic "Adding process variables to a BPD."

      As you are adding parameters for a complex structure type, you can see the resulting changes to the XML schema for the variable type. To see how the variable parameters are declared in the XML schema, open the Advanced Properties section and click View XML Schema.

  3. When you have entered all the necessary parameters and settings for the variable type, click Save in the main toolbar.
  4. Return to the Decision service editing panel, then click Select next to the Variable Type field. The variable type that you added is listed as an available type.


What to do next

In IBM BPM, all complex variables must be initialized before you can use the variables in a BPD or service. Refer to the related topic "Initializing complex variables and lists" for more information.

Adding and modifying Decision service variables


Related concepts:
Default rule variables and parameters


Related tasks:
Scenario: Creating a Decision service in a Personalized Notification process
Adding and modifying Decision service variables
Create custom variable types
Declaring variables for a BPD or a service