Package org.drools.workflow.core.impl

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


    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


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

        return this;
    }

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

        return this;
    }

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

    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 WorkItemNodeFactory onEntryAction(String dialect, String action) {
        if (getWorkItemNode().getActions(dialect) != null) {
          getWorkItemNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getWorkItemNode().setActions(MilestoneNode.EVENT_NODE_ENTER, actions);
        }
        return this;
    }
View Full Code Here

        return this;
    }

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

    public WorkItemNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getWorkItemNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
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

      if (exceptionScopes != null) {
        for (Context context: exceptionScopes) {
          ExceptionScope exceptionScope = (ExceptionScope) context;
          for (ExceptionHandler exceptionHandler: exceptionScope.getExceptionHandlers().values()) {
            if (exceptionHandler instanceof ActionExceptionHandler) {
              DroolsConsequenceAction action = (DroolsConsequenceAction)
                ((ActionExceptionHandler) exceptionHandler).getAction();
              ActionDescr actionDescr = new ActionDescr();
                  actionDescr.setText( action.getConsequence() );  
                  Dialect dialect = buildContext.getDialectRegistry().getDialect( action.getDialect() );           
                  dialect.getActionBuilder().build( buildContext, action, actionDescr, (ProcessImpl) buildContext.getProcess() );
            }
          }
        }
      }
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.