Mapping Data Parameters

You must map parameters for each parameter required by the SQL query or stored procedure

Procedure

  1. Select the service task that you are using to call the database, then click the Database tab of the Properties view.
  2. If you have selected the stored procedure from the database, the Parameter and Type fields are automatically populated from the stored procedure. Otherwise, click the plus sign to add a new mapping.
  3. In the Parameter field, enter a suitable name to identify the database parameter that this mapping refers to.
    Note: Parameters must be listed in the same order that they appear in the query or are used in the stored procedure. You can use the Move Up and Move Down buttons to alter the order of listed mappings.
  4. In the Type field, select:
    • IN, if the mapping defines an input parameter from the process to the database.
    • OUT, if this mapping defines an output parameter from the database to the process.
      Note: If you are using a stored procedure, the Parameter name used for a mapping must be the same as the name of the parameter declared in the stored procedure.
    • INOUT, if this mapping defines an input/output parameter to/from the database.
  5. In the Data Field field, click the picker. The Select Data Field or Formal Parameter dialog is displayed.
  6. Select the process data field or formal parameter that you want to map to this database parameter and click OK.
    Note:
    • The data type of the data field or parameter must match the data type of the database parameter it is being mapped to. TIBCO Business Studio does not validate this.
    • You cannot use a data field or parameter that is defined as an external reference to a business object model for a mapping of type IN. If you select such a data field or parameter, a validation error is displayed against the database service task.
    The following screenshot shows example mappings for a query that takes a single input parameter and returns three output parameters.