procedure CreateProcess (itemtype in varchar2, itemkeys in wf_engine_bulk.itemkeytabtype, process in varchar2, user_keys in wf_engine_bulk.userkeytabtype, owner_roles in wf_engine_bulk.ownerroletabtype, parent_itemtype in varchar2 default null, parent_itemkey in varchar2 default null, parent_context in varchar2 default null, masterdetail in boolean default null);
Creates multiple new runtime process instances of the specified item type at once, based on the specified array of workflow item keys. You can optionally specify one existing work item as the parent for all the new work items.
Note: You cannot use WF_ENGINE_BULK.CreateProcess() to create forced synchronous processes.
If processing fails for any work items, then WF_ENGINE_BULK.CreateProcess() adds those item keys to a global PL/SQL table called g_FailedItems within the WF_ENGINE_BULK package. The procedure then continues processing the remaining items. When processing is complete, the procedure raises an exception for any failed items.
| itemtype | A valid item type. |
| itemkeys | An array of item keys that identify the work items to be created. An item key is a string derived from the application object's primary key that uniquely identifies a work item within an item type. The item type and item key must be passed to all subsequent API calls for the work item.
Note: The item key for a work item can only contain single-byte characters. It cannot contain a multibyte value. You must provide a unique item key for each work item to be created. You cannot use WF_ENGINE_BULK.CreateProcess() to create forced synchronous processes with the generic #SYNCH item key. |
| process | Optionally specify the internal name of the process that you want to run within the specified item type. If this parameter is null, the Workflow Engine uses the item type's selector function to determine the top-level process to run for the first work item being created, and then selects the same process to run for all the other work items. If this parameter is null and the item type does not include a selector function, then WF_ENGINE_BULK.CreateProcess() raises an error. |
| user_keys | An optional array of user-friendly keys to assign to the new work items. The array of user keys must correspond on a one-to-one basis with the array of item keys. |
| owner_roles | An optional array of valid roles to set as the owners of the new work items. The array of owner roles must correspond on a one-to-one basis with the array of item keys.
Note: To enhance security, Oracle Workflow does not allow notifications within a work item to be reassigned to the item owner. |
| parent_itemtype | The item type of the parent work item, if you want to define a parent/child relationship between an existing work item and the new work items. |
| parent_itemkey | The item key that identifies the parent work item within its item type.
Note: The item key for a work item can only contain single-byte characters. It cannot contain a multibyte value. |
| parent_context | You can leave the parent context null if the parent process contains only one Wait for Flow activity, or if the parent process contains multiple Wait for Flow activities and these child processes include a Continue Flow activity for every Wait for Flow activity in the parent process. If the parent process contains multiple Wait for Flow activities and these child processes each only include a Continue Flow activity for one of those Wait for Flow activities, set this parameter to the activity label name for the Wait for Flow activity node to which these child processes correspond. |
| masterdetail | Specify TRUE or FALSE to indicate whether to perform master/detail coordination between the parent process and the child processes. |