Tabnine Logo
WorkflowProcess.getNodes
Code IndexAdd Tabnine to your IDE (free)

How to use
getNodes
method
in
org.kie.api.definition.process.WorkflowProcess

Best Java code snippets using org.kie.api.definition.process.WorkflowProcess.getNodes (Showing top 18 results out of 315)

origin: kiegroup/jbpm

private void visitNodes(WorkflowProcess process, StringBuilder xmlDump, boolean includeMeta) {
  xmlDump.append("  <nodes>" + EOL);
  for (Node node: process.getNodes()) {
    visitNode(node, xmlDump, includeMeta);
  }
  xmlDump.append("  </nodes>" + EOL + EOL);
}

origin: kiegroup/jbpm

private void unregisterExternalEventNodeListeners() {
  for (Node node : getWorkflowProcess().getNodes()) {
    if (node instanceof EventNode) {
      if ("external".equals(((EventNode) node).getScope())) {
        externalEventListeners.remove(((EventNode) node).getType());
      }
    }
  }
}

origin: kiegroup/jbpm

public void buildNodes(WorkflowProcess process, ProcessBuildContext context) {
  processNodes(process.getNodes(), process, context.getProcessDescr(), context);
  if ( !context.getErrors().isEmpty() ) {
    this.errors.addAll( context.getErrors() );
  }
  ProcessDialectRegistry.getDialect(JavaDialect.ID).addProcess( context );
}
origin: kiegroup/jbpm

  from = getNodeId(((WorkflowProcess) processFrom).getNodes(), entry.getKey(), true);
} else if (processFrom instanceof RuleFlowProcess) {
  from = getNodeId(((RuleFlowProcess) processFrom).getNodes(), entry.getKey(), true);
  to = Long.valueOf(getNodeId(((WorkflowProcess) processTo).getNodes(), entry.getValue(), false));
} else if (processTo instanceof RuleFlowProcess) {
  to = Long.valueOf(getNodeId(((RuleFlowProcess) processTo).getNodes(), entry.getValue(), false));
origin: kiegroup/jbpm

visitHeader(process, xmlDump, includeMeta);
visitNodes(process, xmlDump, includeMeta);
visitConnections(process.getNodes(), xmlDump, includeMeta);
xmlDump.append("</process>");
origin: kiegroup/jbpm

visitSubVariableScopes(process.getNodes(), xmlDump, dumpedItemDefs);
visitInterfaces(process.getNodes(), xmlDump);
visitEscalations(process.getNodes(), xmlDump, new ArrayList<String>());
Definitions def = (Definitions) process.getMetaData().get("Definitions");
visitErrors(def, xmlDump);
for( Node procNode : process.getNodes()) { 
  processNodes.add((org.jbpm.workflow.core.Node) procNode);
visitConnections(process.getNodes(), xmlDump, metaDataType);
    "  <bpmndi:BPMNDiagram>" + EOL +
    "    <bpmndi:BPMNPlane bpmnElement=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(process.getId()) + "\" >" + EOL);
  visitNodesDi(process.getNodes(), xmlDump);
  visitConnectionsDi(process.getNodes(), xmlDump);
  xmlDump.append(
    "    </bpmndi:BPMNPlane>" + EOL +
origin: kiegroup/jbpm

for (Node node : getWorkflowProcess().getNodes()) {
  if (node instanceof EventNodeInterface) {
    if (((EventNodeInterface) node).acceptsEvent(type, event, getResolver(node, type, currentView))) {
  for (Node node : getWorkflowProcess().getNodes()) {
    if (type.equals(node.getName()) && node.getIncomingConnections().isEmpty()) {
      NodeInstance nodeInstance = getNodeInstance(node);
origin: kiegroup/jbpm

private void registerExternalEventNodeListeners() {
  for (Node node : getWorkflowProcess().getNodes()) {
    if (node instanceof EventNode) {
      if ("external".equals(((EventNode) node).getScope())) {
        addEventListener(((EventNode) node).getType(), EMPTY_EVENT_LISTENER, true);
      }
    } else if (node instanceof EventSubProcessNode) {
      List<String> events = ((EventSubProcessNode) node).getEvents();
      for (String type : events) {
        addEventListener(type, EMPTY_EVENT_LISTENER, true);
        if (isVariableExpression(type)) {
          addEventListener(resolveVariable(type), EMPTY_EVENT_LISTENER, true);
        }
      }
    }  else if (node instanceof DynamicNode) {
      if (((DynamicNode) node).getActivationEventName() != null) {
      
        addEventListener(((DynamicNode) node).getActivationEventName(), EMPTY_EVENT_LISTENER, true);
      }
    }
  }
  if( getWorkflowProcess().getMetaData().containsKey("Compensation") ) {
    addEventListener("Compensation", new CompensationEventListener(this), true);
  }
}
origin: org.jbpm/jbpm-flow-builder

private void visitNodes(WorkflowProcess process, StringBuilder xmlDump, boolean includeMeta) {
  xmlDump.append("  <nodes>" + EOL);
  for (Node node: process.getNodes()) {
    visitNode(node, xmlDump, includeMeta);
  }
  xmlDump.append("  </nodes>" + EOL + EOL);
}

origin: org.jbpm/jbpm-flow

private void unregisterExternalEventNodeListeners() {
  for (Node node : getWorkflowProcess().getNodes()) {
    if (node instanceof EventNode) {
      if ("external".equals(((EventNode) node).getScope())) {
        externalEventListeners.remove(((EventNode) node).getType());
      }
    }
  }
}

origin: org.jbpm/jbpm-flow-builder

public void buildNodes(WorkflowProcess process, ProcessBuildContext context) {
  processNodes(process.getNodes(), process, context.getProcessDescr(), context);
  if ( !context.getErrors().isEmpty() ) {
    this.errors.addAll( context.getErrors() );
  }
  ProcessDialectRegistry.getDialect(JavaDialect.ID).addProcess( context );
}
origin: stackoverflow.com

 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;
}
origin: org.jbpm/jbpm-flow

  from = getNodeId(((WorkflowProcess) processFrom).getNodes(), entry.getKey(), true);
} else if (processFrom instanceof RuleFlowProcess) {
  from = getNodeId(((RuleFlowProcess) processFrom).getNodes(), entry.getKey(), true);
  to = Long.valueOf(getNodeId(((WorkflowProcess) processTo).getNodes(), entry.getValue(), false));
} else if (processTo instanceof RuleFlowProcess) {
  to = Long.valueOf(getNodeId(((RuleFlowProcess) processTo).getNodes(), entry.getValue(), false));
origin: org.jbpm/jbpm-flow-builder

visitHeader(process, xmlDump, includeMeta);
visitNodes(process, xmlDump, includeMeta);
visitConnections(process.getNodes(), xmlDump, includeMeta);
xmlDump.append("</process>");
origin: org.jbpm/jbpm-bpmn2

visitSubVariableScopes(process.getNodes(), xmlDump, dumpedItemDefs);
visitInterfaces(process.getNodes(), xmlDump);
visitEscalations(process.getNodes(), xmlDump, new ArrayList<String>());
Definitions def = (Definitions) process.getMetaData().get("Definitions");
visitErrors(def, xmlDump);
for( Node procNode : process.getNodes()) { 
  processNodes.add((org.jbpm.workflow.core.Node) procNode);
visitConnections(process.getNodes(), xmlDump, metaDataType);
    "  <bpmndi:BPMNDiagram>" + EOL +
    "    <bpmndi:BPMNPlane bpmnElement=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(process.getId()) + "\" >" + EOL);
  visitNodesDi(process.getNodes(), xmlDump);
  visitConnectionsDi(process.getNodes(), xmlDump);
  xmlDump.append(
    "    </bpmndi:BPMNPlane>" + EOL +
origin: stackoverflow.com

 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;
}
origin: org.jbpm/jbpm-flow

for (Node node : getWorkflowProcess().getNodes()) {
  if (node instanceof EventNodeInterface) {
    if (((EventNodeInterface) node).acceptsEvent(type, event, getResolver(node, type, currentView))) {
  for (Node node : getWorkflowProcess().getNodes()) {
    if (type.equals(node.getName()) && node.getIncomingConnections().isEmpty()) {
      NodeInstance nodeInstance = getNodeInstance(node);
origin: org.jbpm/jbpm-flow

private void registerExternalEventNodeListeners() {
  for (Node node : getWorkflowProcess().getNodes()) {
    if (node instanceof EventNode) {
      if ("external".equals(((EventNode) node).getScope())) {
        addEventListener(((EventNode) node).getType(), EMPTY_EVENT_LISTENER, true);
      }
    } else if (node instanceof EventSubProcessNode) {
      List<String> events = ((EventSubProcessNode) node).getEvents();
      for (String type : events) {
        addEventListener(type, EMPTY_EVENT_LISTENER, true);
        if (isVariableExpression(type)) {
          addEventListener(resolveVariable(type), EMPTY_EVENT_LISTENER, true);
        }
      }
    }  else if (node instanceof DynamicNode) {
      if (((DynamicNode) node).getActivationEventName() != null) {
      
        addEventListener(((DynamicNode) node).getActivationEventName(), EMPTY_EVENT_LISTENER, true);
      }
    }
  }
  if( getWorkflowProcess().getMetaData().containsKey("Compensation") ) {
    addEventListener("Compensation", new CompensationEventListener(this), true);
  }
}
org.kie.api.definition.processWorkflowProcessgetNodes

Popular methods of WorkflowProcess

  • getName
  • getPackageName
  • getVersion
  • getId
  • getMetaData
  • getNode

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • BoxLayout (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now