Search in sources :

Example 1 with AsyncSendNode

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();
}
Also used : BetaConstraints(org.drools.core.common.BetaConstraints) AlphaNodeFieldConstraint(org.drools.core.spi.AlphaNodeFieldConstraint) AsyncSendNode(org.drools.core.reteoo.AsyncSendNode) AsyncSend(org.drools.core.rule.AsyncSend)

Aggregations

BetaConstraints (org.drools.core.common.BetaConstraints)1 AsyncSendNode (org.drools.core.reteoo.AsyncSendNode)1 AsyncSend (org.drools.core.rule.AsyncSend)1 AlphaNodeFieldConstraint (org.drools.core.spi.AlphaNodeFieldConstraint)1