Work with Business Types

Business Types are containers for application data, such as an invoice or purchase order. In Oracle Cloud Infrastructure Process Automation, you can create Business Types and List of Values. You use them to group related data types and to define the structure for data used in your process application.

Once created, the business types and the list of values in your application are listed in the Types page.

Create a Business Type

You can create a business type using attributes to define the data it contains. For example, you can create an employee business type that contains different types of data such as name (string), Id (integer), and address (string).

To create a business type:
  1. Click Add on the top right of the application home page, expand Types and click Business Type.

    Alternatively, if you don't have any business type or list of values created yet for your application, click Types on the Components tab to open the Types page. On the Types page, click Add component icon.

    The Add Component pane appears.

  2. In the Add Component pane, enter the following and click Create.
    • Enter a suitable name in the Title field.
    • If required, you can update the default unique identifier name in the Identifier field.
    • Optionally, enter a suitable description in the Description field.
    A confirmation dialog lets you know that the component is being created. After it gets created, the business type is listed in the Types page.
  3. Click the business type to open it in the editor.
  4. Add attributes to your business type.
    1. Under Add New, enter the attribute name in the Name field. For example, firstName.

      Note that the attribute name should always start with a lowercase alphabet. An inline validation error message lets you know about this.

      The attribute gets added in the Attributes pane. By default, the data type for a newly added attribute will be String.

    2. Select a data type from the Type drop-down list if you want to change the default data type.

      Description of business-type.png follows
      Description of the illustration business-type.png

      The different data types that you can assign to an attribute are:

      • Simple types
      • List of values or Enums
      • Form data objects
      • Data types from connectors
      • Data types from linked external UI
      • Other business types

      If you want to make the selected type as array, select the Make it an array check box.

    To delete an attribute click the Delete icon next to the attribute.

Click the Properties Properties iconicon on the right side of the editor to open the Properties pane and edit the business type's properties. For example, you can edit the name and description of the business type.

Click the Tree View Tree view icon icon on the right side of the editor to drill down and view the data structure of the business type. For example, the image below shows the tree view of a business type Customer. It is configured with simple data types (firstName, lastName), another business object (address), and a list of values (customerType).

Description of business-type-treeview.png follows
Description of the illustration business-type-treeview.png

You can toggle and enable Show all Types to view all types (business types and list of values) present in your application. Expand each type to view the details.

Create a List of Values

List of values (or Enums) are special types of business types that contains a set of predefined constants. For example, a list of values can contain the names of the days of a week (Sunday, Monday, Tuesday, and so on)

To create a list of values:
  1. Click Add on the top right of the application home page, expand Types and click List of Values.

    Alternatively, if you don't have any business types or list of values type created yet for your application, click Types on the components tab to open the Types page. On the Types page, click Add component icon.

    The Add Component pane appears.

  2. In the Add Component pane, enter the following information and click Create.
    • Enter a suitable name in the Title field.
    • If required, you can update the default unique identifier name in the Identifier field.
    • Optionally, enter a suitable description in the Description field.
    • Select a data type (String, Number, or Integer) from the Data Type drop-down list.
    A confirmation dialog lets you know that the component is being created. After it gets created, the list of values is listed in the Types page.
  3. Click the list of values to open it in the editor.
  4. Under Add New, enter a label in the Label field and a corresponding value in the Value field.

    The item gets added to the List of Values pane.

    Add the required number of items to create the list of values.

    You'll get inline validation error if you enter incorrect values. For example, you've created a list of values with integer data type but enter string while setting its values.

    Description of list-values.png follows
    Description of the illustration list-values.png

    To delete an item click the Delete icon next to the item.

Click the Properties Properties iconicon on the right side of the editor to open the Properties pane and edit the list of values' properties. For example, you can edit the name, description or the data type of the list of values.

Click the Tree View Tree view icon icon on the right side of the editor to drill down and view the data structure of the list of values.

You can toggle and enable Show all Types to view all types (business types and list of values) present in your application. Expand each type to view the details.

Use Business Types

You can use the business types and list of values that you have created in multiple ways in a process.

Let's explore through a simple use case how to use business types in a process.

  1. Create a simple structured process to check customer onboarding.
    Process flow:
    • The process starts with a start form that gathers customer information such as the first and last name, address, and also if the customer is new or already registered.
    • If the customer is new the process moves to the next task of gathering customer information.
    • Alternatively, if the customer is already registered, the process moves to the next task of fetching customer information.
    • When the task is submitted, required task notifications are sent and the process completes.
  2. Create the following business types:
    • An Address business type for containing customer address data.
    • A CustomerType list of values for containing the predefined values - New Customer and Registered Customer
    • A Customer business type for containing data such as customer's first and last name, address (using the Address business type), and the type of customer (using the CustomerType list of values).
  3. Use the business types that you created in the following ways:
    1. Use business types in a form: For the customer onboarding form, use the Customer business type. Business types that you've created are available under Types in the form palette. Drag and drop the business type from the form palette onto the form's canvas. You don't have to configure individual form fields but the form fields get automatically configured with the business type. Thus business types can be used to quickly build a complex form with its presentation.
    2. Use business types for configuring conditional flow: You can use the CustomerType list of values to configure the conditional flow of the process.
      • If the customer is new then move to the next task to gather the new customer details.
      • Else, if the customer is already registered then move to the next task of maintaining the existing customer's information.
      Description of use-bt-conflow.png follows
      Description of the illustration use-bt-conflow.png
    3. Use business types in data association: With business types, you can easily configure data associations. You can bind the process data objects directly to the form data objects that were created with the business type. You don't need to bind individual form data objects in your process, as you would have to do with normal form fields.