Oracle Workflow Guide
Release 2.6.2

Part Number A95265-03
  Go to previous page Go to next page       Go To Table Of Contents Go To Index Go To Table Of Contents

                     Contents  Index  Glossary Master Index Feedback
 

CompleteActivity

PL/SQL 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:

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

Arguments (input)

itemtype A 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 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_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


Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.