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'