微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

oracle workflow 使用plsql推送代办

使用 wf_notification.respond 来完成消息的批准,转发,拒绝等操作。 这种方法只适用于对消息节点的操作。 它的好处是会完整地按照如下funcmode 顺序重复调用审批函数: a. VALIDATE b. RESPOND c. CANCEL d. RUN 而WF_ENGINE.COMPLETEACTIVITY的funcmode 永远是 RUN . 对funcmode 做一下解释: 以下是Oracle给出的标准工作流函数的格式: (1) procedure (itemtype in varchar2,itemkey in varchar2,actid in number,funcmode in varchar2,resultout out varchar2) is (2)(3) begin if ( funcmode = 'RUN' ) then resultout := 'COMPLETE:'; return; end if; (4) if ( funcmode = 'CANCEL' ) then resultout := 'COMPLETE'; return; end if; (5) if ( funcmode = 'SKIP' ) then resultout := 'COMPLETE:'; return; end if; (6) if ( funcmode = 'RETRY' ) then resultout := 'COMPLETE:'; return; end if; (7) if ( funcmode = 'VALIDATE' ) then resultout := 'COMPLETE'; return; end if; (8) if ( funcmode = 'RESPOND' ) then resultout := 'COMPLETE'; return; end if; (9) if ( funcmode = 'FORWARD' ) then resultout := 'COMPLETE'; return; end if; (10) if ( funcmode = 'TRANSFER' ) then resultout := 'COMPLETE'; return; end if; (11) if ( funcmode = 'QUESTION' ) then resultout := 'COMPLETE'; return; 6-4 Oracle Workflow Developer's Guide end if; (12) if ( funcmode = 'ANSWER' ) then resultout := 'COMPLETE'; return; end if; (13) if ( funcmode = 'TIMEOUT' ) then if () then resultout := 'COMPLETE'; else resultout := wf_engine.eng_timedout; end if; return; end if; (14) if ( funcmode = '' ) then resultout := ' '; return; end if; (15) exception when others then WF_CORE.CONTEXT ('','',to_char(),); raise; (16) end ; 可以看到,工作流函数会根据funcmode 不同做出不同的响应。 当使用WF_ENGINE.COMPLETEACTIVITY的时候,调用函数的funcmode值永远是RUN. 当使用 wf_notification.respond的时候,工作流会重复调用4次函数,funcmode 分别为 VALIDATE,RESPOND,CANCEL,RUN.以便完全执行工作流函数的每一部分。 其他funcmode是什么情况传入,还不清楚,欢迎补充。 wf_notification.respond的函数原型 procedure Respond(nid in number,--notice id,通知id respond_comment in varchar2,--完成通知附注 responder in varchar2,--通知回复人 action_source in varchar2)--Source from where the action is performed 举例: BEGIN wf_notification.SetAttrText(10399,'RESULT','REJECTED'); --设置notice id 为10399的消息的审批意见为拒绝 wf_notification.respond(10399,null,'刘斌',null); END;

原文地址:https://www.jb51.cc/oracle/211534.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐