Creating business objects

When no system data toolkit variable types or business objects match your specifications, you can create custom variable types called business objects.

Before you begin

To complete the following steps, you must have write access to a process application or toolkit in the IBM® Process Center repository. Access to process applications and toolkits is controlled by users who have administrative rights to the repository.

About this task

In IBM Process Designer, you can create a custom business object by using a base business object or by defining a new complex structure.

When you create a business object in a process application, that object is available for all business processes, case types, and services in the process application. If you want to share a custom business object across process applications, create or store the custom object in a toolkit. Then, create a dependency on that toolkit from the process applications that require the variable.

Note: Case management functions are only available if you have IBM BPM Advanced with the Basic Case Management feature installed.

Procedure

  1. In Process Designer, open your process application.
  2. In the library, beside Data click + and select Business Object to create a new business object. Alternately, you can create a business object by clicking New when you create a variable. The New Business Object window opens.
  3. In the Name field, type a name for the custom business object and click Finish.
    Remember: Names of business objects are case-sensitive.
  4. Under Behavior, you see definition types.
    Simple type
    Creates a new simple business object that is derived from one of String, Integer, Decimal, Date, Time, or Selection. A simple type that is created with the business object editor cannot be initialized before use with a business process or service unlike a complex type. If you do initialize a simple type that uses the new keyword, then you receive a runtime error.
    Complex type
    Creates a new complex business object by specifying the parameters for the structure. Complex structure types that contain primitive types must initialize the primitive types before use.
    An example of initializing a primitive type before use is tw.local.myListOfComplexTypes[0].name = "";.
  5. Select a type from the Definition type list.
    • If you selected Simple type, select the type of your business object and specify a validation if you want. For example, you might want to limit the number of characters for a String type.

      Case runtime behavior affects some string properties. None (unlimited in length) defaults to a maximum of 64 characters. You see a warning that states this limit when you select this property. If your application requires a large string, use the Range property and set a large maximum length. Fixed (always same length) becomes a maximum length.

    • If you selected Complex type, add the parameters and a description of each one, if you want. You can also order the parameters.
  6. Select the Shared Object check box if the business object and its values must be accessible to other instances at run time.
  7. Save your business object.