private void triggerProcessInstance(String userId, String processId) { List<Execution> executionsAtReceiveTask = flowableFacade.findExecutionsAtReceiveTask(processId); if (!executionsAtReceiveTask.isEmpty()) { executionsAtReceiveTask.stream() .forEach(execution -> flowableFacade.trigger(userId, execution.getId())); return; } LOGGER.warn(MessageFormat.format("Process with id {0} is in undetermined process state", processId)); }
private List<HistoricActivityInstance> findCurrentActivitiesAtReceiveTask(Execution execution) { return processEngine.getHistoryService() .createHistoricActivityInstanceQuery() .activityId(execution.getActivityId()) .executionId(execution.getId()) .activityType("receiveTask") .list(); }
List<String> highLightedFlows = new ArrayList<>(); for (Execution execution : executions) { List<String> idList = runtimeService.getActiveActivityIds(execution.getId()); highLightedActivities.addAll(idList);
Map<String, Execution> executionMap = new HashMap<>(); for (Execution execution : executions) { executionMap.put(execution.getId(), execution);