public void signalEvent(String type, Object event) { triggerCompleted(); } }
public void internalTrigger(final NodeInstance from, String type) { super.internalTrigger(from, type); ExecutorService executorService = (ExecutorService) getProcessInstance().getKnowledgeRuntime().getEnvironment().get("ExecutorService"); if (executorService != null) { RuntimeManager runtimeManager = ((RuntimeManager)getProcessInstance().getKnowledgeRuntime().getEnvironment().get("RuntimeManager")); CommandContext ctx = new CommandContext(); ctx.setData("deploymentId", runtimeManager.getIdentifier()); ctx.setData("processInstanceId", getProcessInstance().getId()); ctx.setData("Signal", getEventType()); ctx.setData("Event", null); executorService.scheduleRequest(AsyncSignalEventCommand.class.getName(), ctx); Node node = getNode(); if (node != null) { String uniqueId = (String) node.getMetaData().get("UniqueId"); if( uniqueId == null ) { uniqueId = ((NodeImpl) node).getUniqueId(); } ((WorkflowProcessInstanceImpl) getProcessInstance()).getIterationLevels().remove(getNode().getMetaData().get("UniqueId")); } } else { logger.warn("No async executor service found continuing as sync operation..."); // if there is no executor service available move as sync node triggerCompleted(); } }
public void signalEvent(String type, Object event) { triggerCompleted(); } }
public void internalTrigger(final NodeInstance from, String type) { super.internalTrigger(from, type); ExecutorService executorService = (ExecutorService) getProcessInstance().getKnowledgeRuntime().getEnvironment().get("ExecutorService"); if (executorService != null) { RuntimeManager runtimeManager = ((RuntimeManager)getProcessInstance().getKnowledgeRuntime().getEnvironment().get("RuntimeManager")); CommandContext ctx = new CommandContext(); ctx.setData("deploymentId", runtimeManager.getIdentifier()); ctx.setData("processInstanceId", getProcessInstance().getId()); ctx.setData("Signal", getEventType()); ctx.setData("Event", null); executorService.scheduleRequest(AsyncSignalEventCommand.class.getName(), ctx); Node node = getNode(); if (node != null) { String uniqueId = (String) node.getMetaData().get("UniqueId"); if( uniqueId == null ) { uniqueId = ((NodeImpl) node).getUniqueId(); } ((WorkflowProcessInstanceImpl) getProcessInstance()).getIterationLevels().remove(getNode().getMetaData().get("UniqueId")); } } else { logger.warn("No async executor service found continuing as sync operation..."); // if there is no executor service available move as sync node triggerCompleted(); } }