Previous  Next          Contents  Index  Glossary  Library

CompleteActivity

Syntax

procedure CompleteActivity

    (itemtype in varchar2,
     itemkey in varchar2,
     activity in varchar2,
     result_code in varchar2);

Description

Notifies the workflow engine that the specified activity has been completed for a particular item. This procedure can be called for the following situations:

Arguments (input)

itemtypeA valid item type.
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 key together identify the process.
activity The name of the process activity that is completed. Provide the process activity's label name. If the process activity label name does not uniquely identify the subprocess you can preceed the label name with the internal name of its parent process. For example, <parent_process_internal_name>:<label_name>.
result_code An optional activity completion result. Possible values are determined by the process activity's Result Type, or one of the engine standard results. See: AbortProcess.
Example 1

/*Complete the 'ENTER ORDER' activity for the 'ORDER' item type. The 'ENTER ORDER' activity allows creation of new items since it is the start of a workflow, so the item is created by this call as well.*/

wf_engine.CompleteActivity('ORDER', to_char(order.order_id),
                 'ENTER_ORDER', NULL);

Example 2

/*Complete the 'LEGAL REVIEW' activity with status 'APPROVED'. The item must already exist.*/

wf_engine.CompleteActivity('ORDER', '1003', 'LEGAL_REVIEW',
                 'APPROVED');

Example 3

/*Complete the BLOCK activity which is used in multiple subprocesses in parallel splits.*/

wf_engine.CompleteActivity('ORDER', '1003', 'ORDER_PROCESS:BLOCK-3',
                 'null');


         Previous  Next          Contents  Index  Glossary  Library