Mapping an Externally Referenced Class Attribute to a Database Parameter

A process formal parameter, or a package-level or process-level data field, cannot be mapped to a database parameter if the parameter or data field is defined as an external reference to an attribute of a class defined in a business object model (that is, as structured data).

Procedure

  1. Create an activity-level data field on the Data Fields tab of the database service task. The data field:
    • must be defined as a simple type that matches the type of the attribute you want to reference.
    • must not have the same name as an existing formal parameter, or package-level or process-level data field.
  2. On the Scripts tab, define an Initiate Script (of type JavaScript) to assign the value defined in the desired attribute to the data field.
    Note: The attribute must have been populated earlier in the process - for example, by:
    • passing the data into the process from an external source, using a message start event, a receive task or a catch message intermediate event. See Exposing a Web Service .
    • collecting the data on a form. See "Associating Process Data with Events and Tasks" in TIBCO Business Studio Modeling User’s Guide.
    • in a script, using a dynamically created factory method to create a new data object from the attribute’s parent class. See Dynamically Created Factory Methods .
  3. On the Database tab, map the local data field name to the database parameter (as described in Mapping Data Parameters for each parameter required by the SQL query or stored procedure).