25.1.5 Associating a Table with a Workflow
Associate a workflow with a table or query so activities can reference related row data.
- configure the Additional Data table and primary key column in a workflow definition, and
- supply a Details Primary Key value of a corresponding row when creating a workflow instance.
Then, wherever your app starts a new workflow instance, remember to supply the primary key value of the business entity row to which the new flow relates.
&NAME.in text substitutions,:NAMEin code and queries, andNAMEin activity properties requiring an item name.
For example if your Additional Data table's primary key column is ID, then reference :ID or &ID. or configure ID as the item name providing the value of an activity property.
Tip:
For even more powerful automatic data access in your workflow, change the Additional Data > Type from Table to SQL Query. Your query typically includes a primary table and its primary key column, and can optionally join in any other related data. It must return exactly one row. For workflows accepting a Details Primary Key, your query's WHERE clause can reference its value using the :APEX$WORKFLOW_DETAIL_PK bind variable. Then throughout the workflow you can use &NAME. or :NAME notation to reference the value of any column in your Additional Data query's SELECT list.
Parent topic: Automating a Process with Workflow