Oracle Workflow API Reference Release 2.6.3 Part Number B10286-02 |
Previous | Next | Contents | Index | Glossary |
procedure LaunchProcess
(itemtype in varchar2,
itemkey in varchar2,
process in varchar2 default '',
userkey in varchar2 default '',
owner in varchar2 default '');
Java Syntax
public static boolean launchProcess
(WFContext wCtx,
String itemType,
String itemKey,
String process,
String userKey,
String owner)
Description
Launches a specified process by creating the new runtime process and beginning its execution. This is a wrapper that combines CreateProcess and StartProcess.
Arguments (input)
wCtx | Workflow context information. Required for the Java method only. See: Oracle Workflow Context. |
itemtype | A valid item type. |
itemkey | A string derived from the application object's primary key. The string uniquely identifies the item within an item type. The item type and key together identify the new process and must be passed to all subsequent API calls for that process. |
Note: The item key for a process instance can only contain single-byte characters. It cannot contain a multibyte value.
Note: You can pass #SYNCH as the itemkey to create a forced synchronous process. See: Synchronous, Asynchronous, and Forced Synchronous Processes.
process | An optional argument that allows the selection of a particular process for that item. Provide the process internal name. If process is null, the item type's selector function is used to determine the top level process to run. This argument defaults to null. |
userkey | The user key to assign to the item identified by the specified item type and item key. If userkey is null, then no userkey is assigned to the item instance. |
owner | A valid role designated as the owner of the item. If owner is null, then no owner is assigned to the process and only the workflow administrator role can monitor the process. |
Caution: Although you can make a call to CreateProcess( ) and StartProcess( ) from a database trigger to initiate a workflow process, you should avoid doing so in certain circumstances. For example, if a database entity has headers, lines and details, and you initiate a workflow process from an AFTER INSERT trigger at the header-level of that entity, your workflow process may fail because some subsequent activity in the process may require information from the entity's lines or details level that is not yet populated.
Attention: The Workflow Engine always issues a savepoint before executing each activity in a process so that it can rollback to the previous activity in case an error occurs. For environments such as database triggers or distributed transactions that do not allow savepoints, the Workflow Engine automatically traps "Savepoint not allowed" errors and defers the execution of the activity. If you initiate a workflow process from a database trigger, the Workflow Engine immediately defers the initial start activities to a background engine, so that they are no longer executing from a database trigger.
Previous | Next | Contents | Index | Glossary |