BPMN-Activiti信号中间件实例
2016-08-16 15:17
239 查看
BPM流程图如下:
ExecutionService executionService=bpmProcessService.bpmRestServices(userId).getExecutionService(); String parentId=""; // HistoricProcessInstancesQueryParam historicProcessInstancesQueryParam = new HistoricProcessInstancesQueryParam(); historicProcessInstancesQueryParam.setBusinessKey(bussinessKey); try { JsonNode jsonNode = (JsonNode) bpmProcessService.bpmRestServices(userId).getHistoryService().getHistoricProcessInstances(historicProcessInstancesQueryParam); logger.debug(jsonNode.toString()); ArrayNode node = BaseUtils.getData(jsonNode); List<HistoricProcessInstanceResponse> list = new ArrayList<HistoricProcessInstanceResponse>(); for (int i = 0; node != null && i < node.size(); i++) { JsonNode jn = node.get(i); HistoricProcessInstanceResponse resp = jsonResultService.toObject(jn.toString(), HistoricProcessInstanceResponse.class); list.add(resp); parentId=resp.getId(); logger.debug("parentId:"+parentId); } } catch (RestException e) { logger.error(e.getMessage(),e); } // ProcessInstanceParam processInstanceParam = new ProcessInstanceParam(); // processInstanceParam.setBusinessKey(bussinessKey); // try { // Object obj = bpmProcessService.bpmRestServices(userId).getRuntimeService().getProcessInstances(processInstanceParam); // logger.debug(obj.toString()); // } catch (RestException e) { // e.printStackTrace(); // } //--- String executionId=""; try { ExecutionQueryParam executionQueryParam=new ExecutionQueryParam(); // executionQueryParam.setActivityId("CatchSignalEvent1"); executionQueryParam.setParentId(parentId);//"a0f4ec59-62bf-11e6-9214-b8aeed2e916b" JsonNode executionsJsonNode = (JsonNode)executionService.getExecutions(executionQueryParam); logger.debug(executionsJsonNode.toString()); ArrayNode node = BaseUtils.getData(executionsJsonNode); List<ExecutionResponse> list = new ArrayList<ExecutionResponse>(); for (int i = 0; node != null && i < node.size(); i++) { JsonNode jn = node.get(i); ExecutionResponse resp = jsonResultService.toObject(jn.toString(), ExecutionResponse.class); list.add(resp); executionId=resp.getId(); logger.debug("parentId:"+parentId); } } catch (RestException e) { e.printStackTrace(); } //--- ExecutionParam executionParam = new ExecutionParam(); executionParam.setAction(ExecutionParam.SIGNAL_ACTION); executionParam.setSignalName(signal); try { executionService.actionExecutions(executionId,executionParam);//"743233f1-62ad-11e6-9214-b8aeed2e916b" } catch (RestException e) { e.printStackTrace(); } }
相关文章推荐
- BPMN2,activiti,jbpm5学习资料1(规范,流程实例)
- BPMN2,activiti,jbpm5学习资料1(规范,流程实例)
- PyQt之玩转signal(信号)与slot(槽)一:介绍及简单实例
- activiti自定义流程之Spring整合activiti-modeler5.16实例(三):流程模型列表展示
- Activiti BPMN 2.0 designer插件安装
- Activiti 5.16 版本 - 基于BPMN2.0规范的流程引擎
- activiti自己定义流程之Spring整合activiti-modeler5.16实例(四):部署流程定义
- [置顶] JeeSite 工作流Activiti的应用实例
- Linux进程间通信——信号应用实例
- NodeJS学习笔记之Connect中间件应用实例
- NodeJS学习笔记之Connect中间件应用实例
- activiti自定义流程之Spring整合activiti-modeler实例(一):环境搭建
- activiti删除流程实例与activiti删除部署的流程,是初学者最容易犯的错误
- Activiti基础教程--02(初识Activiti流程设计工具、了解Activiti bpmn图表对应的XML文件)
- Activiti基础教程--05流程实例、任务的执行
- Activiti基础教程--05流程实例、任务的执行
- activiti 流程实例与业务关联
- 连续信号在有限区间上频谱分析实例、实验
- matlab信号处理实例1:信号发生与采样
- 疯狂Activiti6.0连载(26)BPMN边界事件