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

x33g5p2x  于2022-01-25 转载在 其他  
字(12.8k)|赞(0)|评价(0)|浏览(212)

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

Node.getName介绍

[英]The name of the node
[中]节点的名称

代码示例

代码示例来源:origin: kiegroup/jbpm

  1. protected void addErrorMessage(RuleFlowProcess process,
  2. Node node,
  3. List<ProcessValidationError> errors,
  4. String message) {
  5. String error = String.format("Node '%s' [%d] " + message,
  6. node.getName(),
  7. node.getId());
  8. errors.add(new ProcessValidationErrorImpl(process,
  9. error));
  10. }
  11. }

代码示例来源:origin: kiegroup/jbpm

  1. public String toString() {
  2. final StringBuilder sb = new StringBuilder("Connection ");
  3. sb.append(getFrom() == null ? "null" : getFrom().getName());
  4. sb.append(" [type=");
  5. sb.append(getFromType());
  6. sb.append("]");
  7. sb.append(" - ");
  8. sb.append(getTo() == null ? "null" : getTo().getName());
  9. sb.append(" [type=");
  10. sb.append(getToType());
  11. sb.append("]");
  12. return sb.toString();
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. @Override
  2. public boolean acceptsEvent(String type, Object event, Function<String, String> resolver) {
  3. if (type.equals(getActivationEventName())) {
  4. return true;
  5. }
  6. for (Node node : getNodes()) {
  7. if (resolver.apply(node.getName()).contains(type) && node.getIncomingConnections().isEmpty()) {
  8. return true;
  9. }
  10. }
  11. return super.acceptsEvent(type, event);
  12. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddOutgoingConnection(final String type, final Connection connection) {
  2. super.validateAddOutgoingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  6. + "] only accepts default outgoing connection type!");
  7. }
  8. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddOutgoingConnection(final String type, final Connection connection) {
  2. super.validateAddOutgoingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  6. + "] only accepts default outgoing connection type!");
  7. }
  8. if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  11. + "] cannot have more than one outgoing connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. }

代码示例来源:origin: kiegroup/jbpm

  1. public boolean acceptsEvent(String type, Object event) {
  2. if (type.equals(getActivationEventName())) {
  3. return true;
  4. }
  5. for (Node node : getNodes()) {
  6. if (type.equals(node.getName()) && node.getIncomingConnections().isEmpty()) {
  7. return true;
  8. }
  9. }
  10. return super.acceptsEvent(type, event);
  11. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddOutgoingConnection(final String type, final Connection connection) {
  2. super.validateAddOutgoingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  6. + "] only accepts default outgoing connection type!");
  7. }
  8. if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  11. + "] cannot have more than one outgoing connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddOutgoingConnection(final String type, final Connection connection) {
  2. super.validateAddOutgoingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  6. + "] only accepts default outgoing connection type!");
  7. }
  8. if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  11. + "] cannot have more than one outgoing connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddOutgoingConnection(final String type, final Connection connection) {
  2. super.validateAddOutgoingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  6. + "] only accepts default outgoing connection type!");
  7. }
  8. if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  11. + "] cannot have more than one outgoing connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (!getIncomingConnections(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE).isEmpty()) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddIncomingConnection(final String type, final Connection connection) {
  2. super.validateAddIncomingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  6. + "] only accepts default incoming connection type!");
  7. }
  8. if (getFrom() != null) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
  11. + "] cannot have more than one incoming connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void validateAddOutgoingConnection(final String type, final Connection connection) {
  2. super.validateAddOutgoingConnection(type, connection);
  3. if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
  4. throw new IllegalArgumentException(
  5. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  6. + "] only accepts default outgoing connection type!");
  7. }
  8. if (getTo() != null) {
  9. throw new IllegalArgumentException(
  10. "This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
  11. + "] cannot have more than one outgoing connection!");
  12. }
  13. }

代码示例来源:origin: kiegroup/jbpm

  1. public void internalStart(String trigger) {
  2. StartNode startNode = getRuleFlowProcess().getStart(trigger);
  3. if (startNode != null) {
  4. ((NodeInstance) getNodeInstance(startNode)).trigger(null, null);
  5. } else if (!getRuleFlowProcess().isDynamic()) {
  6. throw new IllegalArgumentException("There is no start node that matches the trigger " + (trigger == null ? "none" : trigger));
  7. }
  8. // activate ad hoc fragments if they are marked as such
  9. List<Node> autoStartNodes = getRuleFlowProcess().getAutoStartNodes();
  10. autoStartNodes
  11. .forEach(austoStartNode -> signalEvent(austoStartNode.getName(), null));
  12. }

代码示例来源:origin: kiegroup/jbpm

  1. @Override
  2. public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
  3. NodeInstance nodeInstance = event.getNodeInstance();
  4. String uniqId = ((NodeInstanceImpl) nodeInstance).getUniqueId();
  5. String nodeName = ((NodeInstanceImpl) nodeInstance).getNode().getName();
  6. String prevNodeName = nodeIdNodeNameMap.put( uniqId, nodeName );
  7. if( prevNodeName != null ) {
  8. assertEquals(uniqId + " is used for more than one node instance: ", prevNodeName, nodeName);
  9. }
  10. }

相关文章