/*Oracle Workflow All Function Modes (funcmode) */
begin
---1
if ( funcmode = 'RUN' ) then
<your RUN executable statements>
resultout := 'COMPLETE:<result>';
return;
end if;
---2
if ( funcmode = 'CANCEL' ) then
<your CANCEL executable statements>
resultout := 'COMPLETE';
return;
end if;
---3
if ( funcmode = 'SKIP' ) then
<your SKIP executable statements>
resultout := 'COMPLETE:<result>';
return;
end if;
---4
if ( funcmode = 'RETRY' ) then
<your RETRY executable statements>
resultout := 'COMPLETE:<result>';
return;
end if;
---5
if ( funcmode = 'VALIDATE' ) then
<your VALIDATE executable statements>
resultout := 'COMPLETE';
return;
end if;
---6
if ( funcmode = 'RESPOND' ) then
<your RESPOND executable statements>
resultout := 'COMPLETE';
return;
end if;
---7
if ( funcmode = 'FORWARD' ) then
<your FORWARD executable statements>
resultout := 'COMPLETE';
return;
end if;
---8
if ( funcmode = 'TRANSFER' ) then
<your TRANSFER executable statements>
resultout := 'COMPLETE';
return;
end if;
---9
if ( funcmode = 'QUESTION' ) then
<your QUESTION executable statements>
resultout := 'COMPLETE';
return;
end if;
--10
if ( funcmode = 'ANSWER' ) then
<your ANSWER executable statements>
resultout := 'COMPLETE';
return;
end if;
---11
if ( funcmode = 'TIMEOUT' ) then
<your TIMEOUT executable statements>
if (<condition_ok_to_proceed>) then
resultout := 'COMPLETE';
else
resultout := wf_engine.eng_timedout;
end if;
return;
end if;
--12 Other Developer Defined
if ( funcmode = '<other funcmode>' ) then
resultout := ' ';
return;
end if;
--Main exception
exception
when others then
WF_CORE.CONTEXT ('<package name>', '<procedure name>', <itemtype>,
<itemkey>, to_char(<actid>), <funcmode>);
raise;
end <procedure name>;
begin
---1
if ( funcmode = 'RUN' ) then
<your RUN executable statements>
resultout := 'COMPLETE:<result>';
return;
end if;
---2
if ( funcmode = 'CANCEL' ) then
<your CANCEL executable statements>
resultout := 'COMPLETE';
return;
end if;
---3
if ( funcmode = 'SKIP' ) then
<your SKIP executable statements>
resultout := 'COMPLETE:<result>';
return;
end if;
---4
if ( funcmode = 'RETRY' ) then
<your RETRY executable statements>
resultout := 'COMPLETE:<result>';
return;
end if;
---5
if ( funcmode = 'VALIDATE' ) then
<your VALIDATE executable statements>
resultout := 'COMPLETE';
return;
end if;
---6
if ( funcmode = 'RESPOND' ) then
<your RESPOND executable statements>
resultout := 'COMPLETE';
return;
end if;
---7
if ( funcmode = 'FORWARD' ) then
<your FORWARD executable statements>
resultout := 'COMPLETE';
return;
end if;
---8
if ( funcmode = 'TRANSFER' ) then
<your TRANSFER executable statements>
resultout := 'COMPLETE';
return;
end if;
---9
if ( funcmode = 'QUESTION' ) then
<your QUESTION executable statements>
resultout := 'COMPLETE';
return;
end if;
--10
if ( funcmode = 'ANSWER' ) then
<your ANSWER executable statements>
resultout := 'COMPLETE';
return;
end if;
---11
if ( funcmode = 'TIMEOUT' ) then
<your TIMEOUT executable statements>
if (<condition_ok_to_proceed>) then
resultout := 'COMPLETE';
else
resultout := wf_engine.eng_timedout;
end if;
return;
end if;
--12 Other Developer Defined
if ( funcmode = '<other funcmode>' ) then
resultout := ' ';
return;
end if;
--Main exception
exception
when others then
WF_CORE.CONTEXT ('<package name>', '<procedure name>', <itemtype>,
<itemkey>, to_char(<actid>), <funcmode>);
raise;
end <procedure name>;
No comments:
Post a Comment