Editing business object fields

You can use Event Designer to complete the definition of a business object field. You can view a list of the business object fields and add the definition used to derive each field.

About this task

Use the Business Object editor in Event Designer to view a list of the fields in a business object. You can edit the configuration for each business object field in the Business Object editor, and also create the field definition.

Procedure

  1. In the Event Explorer view, double-click the business object name to open the Business Object editor. By default, the editor opens the Overview tab for the business object. The list of business object fields is displayed in the Fields section of the Overview tab.
  2. To view and edit the configuration of a business object field, click the name of the field in the Fields section, then click Edit. You can also double-click the field name to open the business object field in the editor.
  3. To add or edit the definition used to derive a field, open the Field tab. In the Field page, you can view and edit the following business object field information:
    Table 1. Sections in the Field page
    Section title Description
    General You can view or change the field name and data type in this section.
    Documentation You can enter a description of the field in this section. The business object field documentation is displayed when you edit rules or filters.
    Verbalization You can define how this business object field is referenced when you are writing rules and filters. The verbalization is created by using a template where {this} refers to the business object verbalization, and {name} refers to the business term for this field. For example: "{address} of {this} base of operations."
    Definition Create a field definition to configure how the field obtains a value, if none is supplied from an event object field constructor.
  4. Click the Definition type list and select a type from the following choices. Not all the choices are displayed for each field. For example, Enriched by mapped key is displayed only if a data connection has been defined.
    • Constant value: This option populates the field with a constant if a value is not passed in a mapped event object field. You must enter a fixed value in the Constant value field.

      If an event object field is mapped to the business object field through a field constructor, and if a value is passed from that event object field at run time, then that value overrides the constant value expression. This override is a common source of run time problems, because a constant value can be overridden.

    • Filter: This option populates the field with data that was defined for filters in the current event project. This definition type is available only if at least one filter is defined in the current event project. The data type of the field must be Boolean (true or false). You must select a filter from the Filter list.

      A filter references fields in business objects. Using the filter definition type, you set the value of a Boolean business object field to the result of a filter. This setting means that not only the evaluation of true by the filter, but also the result of the filter, is made available to a resulting action. The same filters that are used in an event rule can also be referenced by the filter definition.

      For example, you define filters called Large Withdrawal and Multiple Withdrawals to monitor suspicious banking activity. If it is important for a touchpoint system to know if the suspicious activity was caused by a large withdrawal or multiple withdrawals, or both, you can get the results of the two filters and pass them on to the action. Setting the result in the business object means that the specific number of withdrawals is passed on, not just that the threshold has been exceeded.

      The main reason to reference a filter is to be able to include the result of a filter in an action object. The advantages of using a filter result are:
      • You can perform calculations involving references to events and actions, which are not possible by using JavaScript.
      • You can perform certain types of calculations more easily by using the filter field in a business object.
      • You can share calculations between a filter and an action.

    • Javascript: This option populates the field with a value derived from a JavaScript expression. You must enter the JavaScript expression in the text field.

      To find out about using JavaScript expressions, see JavaScript expressions in business objects, event objects, and action objects.

    • Named constant: This option populates the field with the value defined for a named constant if a value is not passed in a mapped event object field. Select a valid Named Constant from the list.

    • Enriched by mapped key: This option is used to retrieve data from an external data connection by specifying one or more business object fields as keys, and identifying the business object fields to be retrieved in the query. This type is available only if at least one data connection is defined in the current event project. The fields identified as keys are used to form the WHERE clause, and both the fields identified as keys and other fields are used to form the SELECT clause. The event run time generates an SQL statement and passes it along to the data connection, and all rows that satisfy the SELECT are returned. To use this option, you must define the field mappings in the Database Mappings table, located in the Data Mappings tab.

      To find out about performing data fetches by using mapped keys, see Retrieving data from a database by using mapped keys.

    • Enriched by mapped condition: This option is used to retrieve data from an external data connection by specifying explicit SQL syntax as a condition. This type is available only if at least one data connection is defined in the current event project. Mapping fields are used to identify the table and column referenced by the business object field, and an expression (any part of an SQL statement to the right of the FROM clause, typically a WHERE clause) defines the value used to retrieve the data. The event runtime generates an SQL statement and passes it along to the data connection, and all rows that satisfy the SELECT are returned. To use this option, you must define the field mappings in the Database Mappings table, located in the Data Mappings tab.

      To find out about performing data fetches with mapped conditions, see Retrieving data from a data connection by using a mapped condition.

    • Enriched by mapped query: This option is used to retrieve data from an external data connection by specifying a complete SQL SELECT query or stored procedure call. This type is available only if at least one data connection is defined in the current event project. The fields are mapped to columns from the database query result set. To use this option, you must define the field mappings in the Database Mappings table, located in the Data Mappings tab.

      To find out about performing data fetches with mapped queries, see Retrieving data from a data connection by using a mapped query.

    • Enriched by expression: This option is used to retrieve data from an external data connection by using an SQL expression. This type is available only if at least one data connection is defined in the current event project. The event run time passes the SQL along to the data connection and a single row is returned. If more than one row in a table satisfies the SELECT, then the first row encountered that satisfies the condition is returned.

      To find out about using an SQL expression in a data fetch, see Retrieving data from a data connection by using an SQL expression.

Example

This example shows the business object field page:
Business object field page