本文整理了Java中org.kie.api.runtime.rule.Match.getDeclarationIds()
方法的一些代码示例,展示了Match.getDeclarationIds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Match.getDeclarationIds()
方法的具体详情如下:
包路径:org.kie.api.runtime.rule.Match
类名称:Match
方法名:getDeclarationIds
暂无
代码示例来源:origin: kiegroup/jbpm
protected boolean checkDeclarationMatch(Match match, String matchVariable) {
if (matchVariable == null) {
// no extra check is needed
return true;
}
Object dec = match.getDeclarationIds().contains("$" + matchVariable) ? match.getDeclarationValue("$" + matchVariable) : match.getDeclarationValue(matchVariable);
Object var = getVariable(matchVariable);
boolean check = var.equals(dec);
return check;
}
代码示例来源:origin: kiegroup/jbpm
@Override
public void signalEvent(String type, Object event) {
if (type.startsWith("RuleFlow-AdHocActivate")) {
if (event instanceof MatchCreatedEvent) {
Match match = ((MatchCreatedEvent) event).getMatch();
match.getDeclarationIds().forEach(s -> this.setVariable(s.replaceFirst("\\$", ""), match.getDeclarationValue(s)));
}
trigger(null, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE);
} else if (getActivationEventType().equals(type)) {
if (event instanceof MatchCreatedEvent) {
matchCreated((MatchCreatedEvent) event);
}
} else {
super.signalEvent(type, event);
for (Node node: getCompositeNode().getNodes()) {
if (type.equals(resolveVariable(node.getName())) && node.getIncomingConnections().isEmpty()) {
triggerSelectedNode(node, event);
}
}
}
}
代码示例来源:origin: org.drools/knowledge-api
public List<String> getDeclarationIDs() {
return delegate.getDeclarationIds();
}
代码示例来源:origin: org.jbpm/jbpm-flow
protected boolean checkDeclarationMatch(Match match, String matchVariable) {
if (matchVariable == null) {
// no extra check is needed
return true;
}
Object dec = match.getDeclarationIds().contains("$" + matchVariable) ? match.getDeclarationValue("$" + matchVariable) : match.getDeclarationValue(matchVariable);
Object var = getVariable(matchVariable);
boolean check = var.equals(dec);
return check;
}
代码示例来源:origin: org.jbpm/jbpm-flow
@Override
public void signalEvent(String type, Object event) {
if (type.startsWith("RuleFlow-AdHocActivate")) {
if (event instanceof MatchCreatedEvent) {
Match match = ((MatchCreatedEvent) event).getMatch();
match.getDeclarationIds().forEach(s -> this.setVariable(s.replaceFirst("\\$", ""), match.getDeclarationValue(s)));
}
trigger(null, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE);
} else if (getActivationEventType().equals(type)) {
if (event instanceof MatchCreatedEvent) {
matchCreated((MatchCreatedEvent) event);
}
} else {
super.signalEvent(type, event);
for (Node node: getCompositeNode().getNodes()) {
if (type.equals(resolveVariable(node.getName())) && node.getIncomingConnections().isEmpty()) {
triggerSelectedNode(node, event);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!