Feedback

  • Contents
 

Custom Data Types

Note: This section applies only to IC 4.0 SU1 (Service Update 1) and later versions.

In addition to its native data types, IPA Designer lets you create custom data types to fit your specific needs.

Creating variables with custom data types has an extra step that you don't need with native data types. When you create a variable with a native data type, you just drag the data type from the toolbox into the Variables workspace. When you create a variable with a custom data type, you must define the type first. Only then can you create variables based on the custom type.

After you create a custom data type, IPA Designer lists that type in the Variables Toolbox. You add custom-type variables in the same way as you add variables of native types.

There are two categories of custom data type:

  • Simple: This extends one of IPA Designer's native data types. For example, a TelephoneNumber custom type might extend the String type by allowing only digits.

  • Complex: This data type is a container.  It holds pieces of information called properties. Each property is a basic, simple, or complex type. Properties are similar to variables in that they have names, labels, and descriptions, but they do not have accessibility settings or security settings.

For example, a Customer complex data type might include several string properties (Firstname, Lastname, Street, City, State, Zip), a decimal property (account balance), a date property (FirstPurchaseDate), and a boolean property (IsGoldCustomer).

Certain actions such as Call Web Service automatically create complex data types that represent the inputs and outputs of their operations.  Database actions also create complex data types.  Data types created by process authors are editable. Complex data types created by actions cannot be edited by process authors, but process authors can edit their labels.

When you create a custom or complex data type, you can optionally create a compound identifier from the properties defined for the type. The compound identifier is used to identify a particular item of that same type or to identify items in a collection of that type.  

To create a custom complex data type:

  1. In IPA Designer, right-click a blank area in the Data Types workspace, then click Add in the shortcut menu (see figure).

  2. Click Complex Data Type.

    IPA Designer displays the Add Complex Data Type dialog box (see figure).


    (1) Add property row; (2) Edit selected property row; (3) Delete selected property row; (4) Move row up; (5) Move row down.

    If a property is a collection, the Type column includes the word "Collection" in that property's row.

  3. Enter a name and description for the type. If needed, select an existing category or enter a new category in the Category list box.

    Names for complex data types need to be unique within a process. Category is a grouping mechanism that makes it easier to organize types.

  4. Click the Plus icon to add a property.

    IPA Designer displays the Create Complex Property Definition dialog (see figure). The dialog will vary depending on the data type you choose for the property. It might not exactly match the figure.

  5. Define the property as you would normally define a variable of that data type, then click Add.

Note: If you give a property a label different from its name, then IPA Designer's literal editor refers to the property by its label instead of by its name. For example, suppose you create a variable using a custom data type that has a property called FName with the label "First Name". If you assign a value to the labeled property, the editor displays "First Name" instead of FName.

  1. If you want to create a compound identifier from the existing properties for the type, select the Set custom unique identifier check box. On the right side of the box, click the button and then click Calculation. Next, click the hyperlink in the box to open the Custom Calculation Builder dialog box and create the custom calculation.

Note: If the user selects the check boxes in the complex data type definition, IPA uses the ToString() function instead of ToDisplay() when generating the expression for the type definition. IPA uses this expression to generate the $ID value on a complex data type. The core parser still uses ToDisplay() for implicit string conversions.

 

  1. Repeat steps 4 and 5 to add more properties as needed. Then click OK.

    IPA Designer adds your custom data type to the data types list (see figure).

 

To create a custom simple data type:

  1. In IPA Designer, right-click a blank area in the Data Types workspace, then click Add in the shortcut menu (see figure).

  2. Click Simple Data Type.

    IPA Designer displays the Add Simple Data Type dialog (see figure). The dialog will vary depending on the data type you choose for the property. It might not exactly match the figure.

  3. Define the variable as you would normally define a variable of that data type, then click Add.

    IPA Designer adds your custom data type to the data types list (see figure).

  4. Repeat steps 1-3 to add more simple data types as needed.