Package org.drools.workflow.core.impl

Examples of org.drools.workflow.core.impl.DroolsConsequenceAction


    public HumanTaskNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getHumanTaskNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
View Full Code Here


      return this;
    }
   
    public CompositeNodeFactory exceptionHandler(String exception, String dialect, String action) {
      ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
      exceptionHandler.setAction(new DroolsConsequenceAction(dialect, action));
      return exceptionHandler(exception, exceptionHandler);
    }
View Full Code Here

        return this;
    }

    public MilestoneNodeFactory onEntryAction(String dialect, String action) {
        if (getMilestoneNode().getActions(dialect) != null) {
            getMilestoneNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getMilestoneNode().setActions(MilestoneNode.EVENT_NODE_ENTER, actions);
        }
        return this;
    }
View Full Code Here

        return this;
    }

    public MilestoneNodeFactory onExitAction(String dialect, String action) {
        if (getMilestoneNode().getActions(dialect) != null) {
            getMilestoneNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getMilestoneNode().setActions(MilestoneNode.EVENT_NODE_EXIT, actions);
        }
        return this;
    }
View Full Code Here

    public MilestoneNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getMilestoneNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
View Full Code Here

        return this;
    }

    public SubProcessNodeFactory onEntryAction(String dialect, String action) {
        if (getSubProcessNode().getActions(dialect) != null) {
          getSubProcessNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getSubProcessNode().setActions(MilestoneNode.EVENT_NODE_ENTER, actions);
        }
        return this;
    }
View Full Code Here

        return this;
    }

    public SubProcessNodeFactory onExitAction(String dialect, String action) {
        if (getSubProcessNode().getActions(dialect) != null) {
          getSubProcessNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getSubProcessNode().setActions(MilestoneNode.EVENT_NODE_EXIT, actions);
        }
        return this;
    }
View Full Code Here

    public SubProcessNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getSubProcessNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
View Full Code Here

      return this;
    }
   
    public RuleFlowProcessFactory exceptionHandler(String exception, String dialect, String action) {
      ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
      exceptionHandler.setAction(new DroolsConsequenceAction(dialect, action));
      return exceptionHandler(exception, exceptionHandler);
    }
View Full Code Here

                if (actionNode.getAction() == null) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "Action node '" + node.getName() + "' [" + node.getId() + "] has no action."));
                } else {
                    if (actionNode.getAction() instanceof DroolsConsequenceAction) {
                        DroolsConsequenceAction droolsAction = (DroolsConsequenceAction) actionNode.getAction();
                        String actionString = droolsAction.getConsequence();
                        if (actionString == null) {
                            errors.add(new ProcessValidationErrorImpl(process,
                                "Action node '" + node.getName() + "' [" + node.getId() + "] has empty action."));
                        } else if( "mvel".equals( droolsAction.getDialect() ) ) {
                            try {
                                ExpressionCompiler compiler = new ExpressionCompiler(actionString);
                                compiler.setVerifying(true);
                                ParserContext parserContext = new ParserContext();
                                //parserContext.setStrictTypeEnforcement(true);
View Full Code Here

TOP

Related Classes of org.drools.workflow.core.impl.DroolsConsequenceAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.