Skip Headers

Oracle Workflow API Reference
Release 2.6.3.5

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

CompleteActivity

PL/SQL Syntax

procedure CompleteActivity

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

Java Syntax

public static boolean completeActivity

    (WFContext wCtx,
String itemType,
String itemKey,
String activity,
String result)

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:

Note: Starting a process using CompleteActivity() differs from starting a process using CreateProcess() and StartProcess() in these ways:

Arguments (input)

wCtx Workflow context information. Required for the Java method only. See: Oracle Workflow Context.
itemtype or itemType A valid item type.
itemkey or 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 activity node that is completed. Provide the activity node's label name. If the activity node label name does not uniquely identify the subprocess you can precede the label name with the internal name of its parent process. For example, <parent_process_internal_name>:<label_name>. This activity node must be marked as a 'Start' activity.
result 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



Oracle Logo
Copyright © 2003, 2004, Oracle. All rights reserved.