Oracle Workflow API Reference Release 2.6.3 Part Number B10286-02 |
Previous | Next | Contents | Index | Glossary |
procedure BeginActivity
(itemtype in varchar2,
itemkey in varchar2,
activity in varchar2);
Description
Determines if the specified activity can currently be performed on the process item and raises an exception if it cannot.
The CompleteActivity() procedure automatically performs this function as part of its validation. However, you can use BeginActivity to verify that the activity you intend to perform is currently allowed before actually calling it. See: CompleteActivity.
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 activity node to perform on the process. Provide the activity node's label name. If the activity node label name does not uniquely identify the activity node you can precede the label name with the internal name of its parent process. For example, <parent_process_internal_name>:<label_name>. |
/*Verify that a credit check can be performed on an order. If it is allowed, perform the credit check, then notify the Workflow Engine when the credit check completes.*/
begin
wf_engine.BeginActivity('ORDER', to_char(order_id),'CREDIT_CHECK');
OK := TRUE;
exception
when others then
WF_CORE.Clear;
OK := FALSE;
end;
if OK then
-- perform activity --
wf_engine.CompleteActivity('ORDER', to_char(order_id),
'CREDIT_CHECK' :result_code);
end if;
Previous | Next | Contents | Index | Glossary |