zoukankan      html  css  js  c++  java
  • 如何为workflow单据类型定义一个form属性,在notify中通过这个属性打开表单

    表单名称:MYFORM
    数据块名称:MYBLOCK
    第一步:
    在表单中加入参数:WF_ITEMKEY
    MYBLOCK的数据来源中必须有WF_ITEMKEY这个字段。
    修改或添加数据块级触发器:WHEN-NEW-BLOCK-INSTANCE
    if :Parameter.wf_itemkey is not null
    then
       declare
          ls_where         varchar2(1000);
          ls_this_where    varchar2(1000);
       begin
          ls_where := GET_BLOCK_PROPERTY(MYBLOCK,DEFAULT_WHERE);
          if ls_where is null
          then
             ls_this_where := '1=1 ';
          else
             ls_this_where := ls_where;
          end if;

          ls_this_where := ls_this_where||' and (wf_itemkey = :Parameter.wf_itemkey)';

          SET_BLOCK_PROPERTY(MYBLOCK',DEFAULT_WHERE,LS_THIS_WHERE);
          app_find.find('MYBLOCK');
          SET_BLOCK_PROPERTY('MYBLOCK',DEFAULT_WHERE,LS_WHERE);
       end;
    end if;

    第二步:
    在plsql的包中设计:
    -- 创建工作流
          wf_engine.createprocess(
             itemtype    => lis_itemtype     ,   -- in varchar2
             itemkey     => lis_itemkey      ,   -- in varchar2
             process     => lis_wfprocess    ,   -- in varchar2 default ’’
          user_key    => ls_user_key      ,   -- in varchar2 default null
             owner_role => ls_owner_role    ); -- in varchar2 default null

    -- 打开表单MYFORM
          wf_engine.setitemattrtext(
             itemtype    => lis_itemtype               ,   -- in varchar2
             itemkey     => lis_itemkey                ,   -- in varchar2
             aname       => 'OPEN_FORM_COMMAND'        ,   -- in varchar2
             avalue      => 'MYFORM:WF_ITEMKEY="'        -- in varchar2
                           || lis_itemkey
                           || '"'
                             );

    --启动工作流
          wf_engine.startprocess(
             itemtype    => lis_itemtype     ,   -- in varchar2
             itemkey     => lis_itemkey      ); -- in varchar2

    第三步:
    在workflow builder中设计:
    增加属性,名称为OPEN_FORM_COMMAND    类型为: Form
    在message中,将此属性拉过去就好了,不必写在message body中。

    第四步:
    在notify中,应该可以会出现“OPEN_FORM_COMMAND”,选中点击就可以链接到表单了。

             

                成长

           /      |     \

        学习   总结   分享

    QQ交流群:122230156

  • 相关阅读:
    js rsa sign使用笔记(加密,解密,签名,验签)
    金额的计算
    常用js方法集合
    sourceTree 的使用
    node-- express()模块
    详细讲解vue.js里的父子组件通信(props和$emit)
    Vue -- vue-cli webpack打包开启Gzip 报错
    es6函数的rest参数和拓展运算符(...)的解析
    js中判断对象数据类型的方法
    vue学习之vue基本功能初探
  • 原文地址:https://www.cnblogs.com/benio/p/1978222.html
Copyright © 2011-2022 走看看