Skip Headers

Oracle Workflow API Reference
Release 2.6.3

Part Number B10286-02
Previous Next       Contents Index Glossary
         Previous  Next          Contents  Index  Glossary

CreateForkProcess

PL/SQL Syntax

procedure CreateForkProcess

(copy_itemtype in varchar2,
copy_itemkey in varchar2,
new_itemkey in varchar2,
same_version in boolean default TRUE);

Description

Forks a runtime process by creating a new process that is a copy of the original. After calling CreateForkProcess(), you can call APIs such as SetItemOwner(), SetItemUserKey(), or the SetItemAttribute APIs to reset any item properties or modify any item attributes that you want for the new process. Then you must call StartForkProcess() to start the new process.

Use CreateForkProcess() when you need to change item specific attributes during the course of a process. For example, if an order cannot be met due to insufficient inventory stock, you can use CreateForkProcess() to fork a new transaction for the backorder quantity. Note that any approval notification will be copied. The result is as if two items were created for this transaction.

Arguments (input)

copy_itemtype A valid item type for the original process to be copied. The new process will have the same item type.
copy_itemkey A string generated from the application object's primary key. The string uniquely identifies the item within an item type. The copy item type and key together identify the original process to be copied.
new_itemkey A string generated from the application object's primary key. The string uniquely identifies the item within an item type. The item type and new item key together identify the new process.
Note: The item key for a process instance can only contain single-byte characters. It cannot contain a multibyte value.
same_version Specify TRUE or FALSE to indicate whether the new runtime process uses the same version as the original or the latest version. If you specify TRUE, CreateForkProcess() copies the item attributes and status of the original process to the new process. If you specify FALSE, CreateForkProcess() copies the item attributes of the original process to the new process but does not not copy the status. Defaults to TRUE.
Caution: Do not call CreateForkProcess() and StartForkProcess() from within a parallel branch in a process. These APIs do not copy any branches parallel to their own branch that are not active.
Note: When you fork an item, Oracle Workflow automatically creates an item attribute called #FORKED_FROM for the new item and sets the attribute to the item key of the original item. This attribute provides an audit trail for the forked item.

         Previous  Next          Contents  Index  Glossary


Oracle Logo
Copyright © 2003 Oracle Corporation.

All rights reserved.