本文整理了Java中org.kie.api.definition.process.Node.getName()
方法的一些代码示例,展示了Node.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getName()
方法的具体详情如下:
包路径:org.kie.api.definition.process.Node
类名称:Node
方法名:getName
[英]The name of the node
[中]节点的名称
代码示例来源:origin: kiegroup/jbpm
protected void addErrorMessage(RuleFlowProcess process,
Node node,
List<ProcessValidationError> errors,
String message) {
String error = String.format("Node '%s' [%d] " + message,
node.getName(),
node.getId());
errors.add(new ProcessValidationErrorImpl(process,
error));
}
}
代码示例来源:origin: kiegroup/jbpm
public String toString() {
final StringBuilder sb = new StringBuilder("Connection ");
sb.append(getFrom() == null ? "null" : getFrom().getName());
sb.append(" [type=");
sb.append(getFromType());
sb.append("]");
sb.append(" - ");
sb.append(getTo() == null ? "null" : getTo().getName());
sb.append(" [type=");
sb.append(getToType());
sb.append("]");
return sb.toString();
}
代码示例来源:origin: kiegroup/jbpm
@Override
public boolean acceptsEvent(String type, Object event, Function<String, String> resolver) {
if (type.equals(getActivationEventName())) {
return true;
}
for (Node node : getNodes()) {
if (resolver.apply(node.getName()).contains(type) && node.getIncomingConnections().isEmpty()) {
return true;
}
}
return super.acceptsEvent(type, event);
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddOutgoingConnection(final String type, final Connection connection) {
super.validateAddOutgoingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] only accepts default outgoing connection type!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddOutgoingConnection(final String type, final Connection connection) {
super.validateAddOutgoingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] only accepts default outgoing connection type!");
}
if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] cannot have more than one outgoing connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
}
代码示例来源:origin: kiegroup/jbpm
public boolean acceptsEvent(String type, Object event) {
if (type.equals(getActivationEventName())) {
return true;
}
for (Node node : getNodes()) {
if (type.equals(node.getName()) && node.getIncomingConnections().isEmpty()) {
return true;
}
}
return super.acceptsEvent(type, event);
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddOutgoingConnection(final String type, final Connection connection) {
super.validateAddOutgoingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] only accepts default outgoing connection type!");
}
if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] cannot have more than one outgoing connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddOutgoingConnection(final String type, final Connection connection) {
super.validateAddOutgoingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] only accepts default outgoing connection type!");
}
if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] cannot have more than one outgoing connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddOutgoingConnection(final String type, final Connection connection) {
super.validateAddOutgoingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] only accepts default outgoing connection type!");
}
if (getTo() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] cannot have more than one outgoing connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (!getIncomingConnections(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE).isEmpty()) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddIncomingConnection(final String type, final Connection connection) {
super.validateAddIncomingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] only accepts default incoming connection type!");
}
if (getFrom() != null) {
throw new IllegalArgumentException(
"This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName()
+ "] cannot have more than one incoming connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void validateAddOutgoingConnection(final String type, final Connection connection) {
super.validateAddOutgoingConnection(type, connection);
if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] only accepts default outgoing connection type!");
}
if (getTo() != null) {
throw new IllegalArgumentException(
"This type of node [" + connection.getFrom().getMetaData().get("UniqueId") + ", " + connection.getFrom().getName()
+ "] cannot have more than one outgoing connection!");
}
}
代码示例来源:origin: kiegroup/jbpm
public void internalStart(String trigger) {
StartNode startNode = getRuleFlowProcess().getStart(trigger);
if (startNode != null) {
((NodeInstance) getNodeInstance(startNode)).trigger(null, null);
} else if (!getRuleFlowProcess().isDynamic()) {
throw new IllegalArgumentException("There is no start node that matches the trigger " + (trigger == null ? "none" : trigger));
}
// activate ad hoc fragments if they are marked as such
List<Node> autoStartNodes = getRuleFlowProcess().getAutoStartNodes();
autoStartNodes
.forEach(austoStartNode -> signalEvent(austoStartNode.getName(), null));
}
代码示例来源:origin: kiegroup/jbpm
@Override
public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
NodeInstance nodeInstance = event.getNodeInstance();
String uniqId = ((NodeInstanceImpl) nodeInstance).getUniqueId();
String nodeName = ((NodeInstanceImpl) nodeInstance).getNode().getName();
String prevNodeName = nodeIdNodeNameMap.put( uniqId, nodeName );
if( prevNodeName != null ) {
assertEquals(uniqId + " is used for more than one node instance: ", prevNodeName, nodeName);
}
}
内容来源于网络,如有侵权,请联系作者删除!