分享

jbpm4.4查询实例

 怀旧妞妞 2010-11-25
JBPM4.4:
1、根据任务ID找出流程定义ID(jbpm4_deployprop_  stringvar_==ProcessDefinition.getId())
select t.procdefid_ from jbpm4_execution t where t.dbid_=(select  tt.execution_  from jbpm4_task tt where tt.dbid_= 10020)
2、根据任务当前活动名称(task.getName())找出任务中的变量名(==candidate-groups="#{dep1}")
select t.KEY_ from jbpm4_variable t where t.EXECUTION_ in (select  t.DBID_  from jbpm4_execution t  where t.ACTIVITYNAME_ ='"+str+"');
3、根据流程实例找出任务信息
ProcessEngine processEngine = Configuration.getProcessEngine();
  RepositoryService repositoryService = processEngine.getRepositoryService();
   pdList = repositoryService.createProcessDefinitionQuery().list();
pdId = pdList.get(0).getId();
ProcessInstance processInstance = executionService.startProcessInstanceById(pdId, map);
 String pid= processInstance.getId();
select t.*, t.rowid from jbpm4_task t where t.execution_id_='FaWenShenPi.390001'
4.用流程实例ID找出任务历史数据:
对流程实例的用户处理信息历史记录
select t.*, t.rowid from jbpm4_hist_task t where t.execution_='FeiYongBaoXiao.370015'
对整个流程实例所以的历史记录包括任务活动名称,带 jbpm4_hist_task 外键
select t.*, t.rowid from jbpm4_hist_actinst t where t.execution_='FeiYongBaoXiao.370015'

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多