2014年11月11日 星期二

查詢報檢單號所處流程以及在哪個User手裡

select b.name_, e.user_name
  from jbpm_variableinstance a, jbpm_taskinstance b, t_user e
where a.taskinstance_ = b.id_
   and a.stringvalue_ = '14100001029'
   and b.end_ is null
   and b.actorid_ = e.user_id
union all
select b.name_, e.user_name
  from jbpm_variableinstance a,
       jbpm_taskinstance     b,
       t_user                e,
       jbpm_taskactorpool    g
where a.taskinstance_ = b.id_
   and a.stringvalue_ = '14100001029'
   and b.end_ is null
   and g.actorid_ = e.user_id
   and a.taskinstance_ = g.taskinstance_;

沒有留言:

張貼留言