public String toString() { final StringBuilder sb = new StringBuilder("WorkflowProcessInstance"); sb.append(getId()); sb.append(" [processId="); sb.append(getProcessId()); sb.append(",state="); sb.append(getState()); sb.append("]"); return sb.toString(); }
ObjectOutputStream stream = context.stream; stream.writeLong(workFlow.getId()); stream.writeUTF(workFlow.getProcessId()); stream.writeInt(workFlow.getState()); stream.writeLong(workFlow.getNodeInstanceCounter());
throw new IllegalArgumentException("Could not find process " + processId); if (processInstance.getProcessId().equals(processId)) { return;
throw new IllegalArgumentException("Could not find process " + processId); if (processInstance.getProcessId().equals(processId)) { return null;
ContextContainer compensationScopeContainer = null; if( generalCompensation ) { if( toCompensateNodeId.equals(instance.getProcessId()) ) { compensationScopeContainer = process; } else {
when(processInstance.getCorrelationKey()).thenReturn("key"); when(processInstance.getParentProcessInstanceId()).thenReturn(-1L); when(processInstance.getProcessId()).thenReturn("myprocess"); when(processInstance.getDescription()).thenReturn(""); when(processInstance.getProcessName()).thenReturn("MyProcess");
when(processInstance.getCorrelationKey()).thenReturn("key"); when(processInstance.getParentProcessInstanceId()).thenReturn(-1L); when(processInstance.getProcessId()).thenReturn("myprocess"); when(processInstance.getDescription()).thenReturn(""); when(processInstance.getProcessName()).thenReturn("MyProcess");
report.addEntry(Type.ERROR, "Could not find process " + processId); if (processInstance.getProcessId().equals(processId)) { report.addEntry(Type.WARN, "Source and target process id is exactly the same (" + processId + ") it's recommended to use unique process ids");
.setProcessId( workFlow.getProcessId() ) .setState( workFlow.getState() ) .setNodeInstanceCounter( workFlow.getNodeInstanceCounter() )
public String toString() { final StringBuilder sb = new StringBuilder("WorkflowProcessInstance"); sb.append(getId()); sb.append(" [processId="); sb.append(getProcessId()); sb.append(",state="); sb.append(getState()); sb.append("]"); return sb.toString(); }
public static Map<ConnectionRef, Constraint> getNextGatewayConstraints(final StatefulKnowledgeSession inSession, final WorkflowProcessInstanceImpl inInstance, final Node inTaskNode) { final Map<ConnectionRef, Constraint> constraints = new HashMap<>(); final WorkflowProcess process = (WorkflowProcess) inSession.getKnowledgeBase().getProcess(inInstance.getProcessId()); for (Node node : process.getNodes()) { if (!node.equals(inTaskNode)) { continue; } final List<Connection> nodeConnections = node.getOutgoingConnections(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); if (nodeConnections != null && !nodeConnections.isEmpty()) { for (Connection c : nodeConnections) { final Node nextNode = c.getTo(); if (nextNode instanceof Split) { constraints.putAll(((Split) nextNode).getConstraints()); return constraints; } } } break; } return constraints; }
ObjectOutputStream stream = context.stream; stream.writeLong(workFlow.getId()); stream.writeUTF(workFlow.getProcessId()); stream.writeInt(workFlow.getState()); stream.writeLong(workFlow.getNodeInstanceCounter());
throw new IllegalArgumentException("Could not find process " + processId); if (processInstance.getProcessId().equals(processId)) { return;
throw new IllegalArgumentException("Could not find process " + processId); if (processInstance.getProcessId().equals(processId)) { return null;
public static List<Node> getProcessActiveNodeList(final StatefulKnowledgeSession inSession, final WorkflowProcessInstanceImpl inInstance) { final List<Node> nodes = new ArrayList<>(); final WorkflowProcess process = (WorkflowProcess) inSession.getKnowledgeBase().getProcess(inInstance.getProcessId()); for (Node node : process.getNodes()) { if (node instanceof EventNode && ((EventNode) node).getFrom() == null) { // a free-standing event, without an entry point; this would be a start of an "optional" branch nodes.add(node); } else { // a node that has an inbound connection; all nodes on the main branch are of this kind List<NodeInstance> nodeInstances = inInstance.getNodeInstances(node.getId()); if (nodeInstances != null && !nodeInstances.isEmpty()) { for (NodeInstance nodeInstance : nodeInstances) { Node nodeInstanceNode = process.getNode(nodeInstance.getNodeId()); nodes.add(0, nodeInstanceNode); } } } } return nodes; }
ContextContainer compensationScopeContainer = null; if( generalCompensation ) { if( toCompensateNodeId.equals(instance.getProcessId()) ) { compensationScopeContainer = process; } else {
report.addEntry(Type.ERROR, "Could not find process " + processId); if (processInstance.getProcessId().equals(processId)) { report.addEntry(Type.WARN, "Source and target process id is exactly the same (" + processId + ") it's recommended to use unique process ids");
.setProcessId( workFlow.getProcessId() ) .setState( workFlow.getState() ) .setNodeInstanceCounter( workFlow.getNodeInstanceCounter() )