gpt4 book ai didi

org.kie.api.definition.process.WorkflowProcess.getNodes()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 16:53:05 27 4
gpt4 key购买 nike

本文整理了Java中org.kie.api.definition.process.WorkflowProcess.getNodes()方法的一些代码示例,展示了WorkflowProcess.getNodes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowProcess.getNodes()方法的具体详情如下:
包路径:org.kie.api.definition.process.WorkflowProcess
类名称:WorkflowProcess
方法名:getNodes

WorkflowProcess.getNodes介绍

暂无

代码示例

代码示例来源: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);
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com