I am trying to use an activity of type Invoke Workflow in a parent workflow to start multiple child workflow instances.
The setup is:
- Parent workflow has an activity “Invoke Workflow”
- The child workflow has an IN parameter ROLE_ID
- In the parent activity:
- Details Primary Key Item = ROLE_ID
- Workflow ID Item = CHILD_WF_ID (Application Item; I tried other types of variables/parameters, only Application Item seemed to work, which seems a bit odd to me)
- Additional Data query:
select r.id as ROLE_ID
from role_table r
where r.run_id = :RUN_ID
and r.status <> ‘COMPLETED’;
If this query returns exactly one row, the child workflow starts successfully.
If the query returns more than one row, the parent workflow faults immediately with:
ORA-20999: Additional data row associated with this workflow instance is not found
Questions:
- Does APEX officially support one child workflow instance per row returned by Additional Data?
- Are there restrictions on the Additional Data query (e.g. must it be single-table, primary-key only, etc.)?
- Is there a documented example of a working multi-row Invoke Workflow configuration?
If multi-row invocation is not supported in this way, what is the recommended declarative pattern for:
- A parent workflow
- Spawning N child workflows dynamically
- Waiting until all children are completed
- Then completing the parent workflow
Any guidance or minimal working example would be highly appreciated.
Reto