use of org.drools.core.reteoo.AsyncSendNode in project drools by kiegroup.
the class AsyncSendBuilder method build.
@Override
public void build(BuildContext context, BuildUtils utils, RuleConditionElement rce) {
final AsyncSend send = (AsyncSend) rce;
context.pushRuleComponent(send);
@SuppressWarnings("unchecked") BetaConstraints betaConstraints = utils.createBetaNodeConstraint(context, context.getBetaconstraints(), true);
AlphaNodeFieldConstraint[] alphaNodeFieldConstraints = context.getAlphaConstraints() != null ? context.getAlphaConstraints().toArray(new AlphaNodeFieldConstraint[context.getAlphaConstraints().size()]) : new AlphaNodeFieldConstraint[0];
NodeFactory nodeFactory = CoreComponentFactory.get().getNodeFactoryService();
AsyncSendNode sendNode = nodeFactory.buildAsyncSendNode(context.getNextNodeId(), send.getDataProvider(), context.getTupleSource(), alphaNodeFieldConstraints, betaConstraints, context.isTupleMemoryEnabled(), context, send);
context.setTupleSource(utils.attachNode(context, sendNode));
context.setAlphaConstraints(null);
context.setBetaconstraints(null);
context.popRuleComponent();
}
Aggregations