How to run workflow using PL/SQL

本文展示了一个使用PL/SQL创建并启动工作流实例的过程。通过声明变量并调用wf_engine包的方法,实现了流程实例的创建、参数设置及启动。此外,还提供了用于查询工作流状态的相关SQL语句。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Run workflow from PL/SQL

declare
  v_itemtype varchar2(30):='TPLEAVE';          --Item Type Internal Nam
  v_process varchar2(30):='DEFAULT_PROCESS';   --Process Name
  v_itemkey varchar2(30);
begin
  select rcv_transactions_s.nextval into v_itemkey from dual; --Assign a item key

  wf_engine.createprocess(v_itemtype, v_itemkey,v_process);  --Creates a new runtime process for an application item.

  wf_engine.SetItemAttrText(v_itemtype ,v_itemkey,'EMPLOYEE','OPERATIONS');  --Input Parameter
  wf_engine.SetItemAttrText(v_itemtype ,v_itemkey,'MANAGER','CBROWN');     --Input Parameter
  wf_engine.SetItemAttrDate(v_itemtype ,v_itemkey,'START_DATE',sysdate);   --Input Parameter
  wf_engine.SetItemAttrDate(v_itemtype ,v_itemkey,'END_DATE',SYSDATE+1);   --Input Parameter


  wf_engine.StartProcess(v_itemtype, v_itemkey);    --Begins execution of the specified process.
  commit;
end;

Related Queries:

select * from wf_items where item_type = 'TPLEAVE' ;

select * from wf_item_activity_statuses where item_type = 'TPLEAVE' and item_key= '4088307' ;

select * from wf_notifications where notification_id = 8972914;



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值