Examples of ActionExceptionHandler


Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

        if (exceptionHandlers != null && exceptionHandlers.size() > 0) {
            xmlDump.append("    <exceptionHandlers>" + EOL);
            for (Map.Entry<String, ExceptionHandler> entry: exceptionHandlers.entrySet()) {
              ExceptionHandler exceptionHandler = entry.getValue();
              if (exceptionHandler instanceof ActionExceptionHandler) {
                ActionExceptionHandler actionExceptionHandler = (ActionExceptionHandler) exceptionHandler;
                xmlDump.append("      <exceptionHandler faultName=\"" + entry.getKey() + "\" type=\"action\" ");
                String faultVariable = exceptionHandler.getFaultVariable();
                if (faultVariable != null && faultVariable.length() > 0) {
                  xmlDump.append("faultVariable=\"" + faultVariable + "\" ");
                }
              xmlDump.append(">" + EOL);
              DroolsAction action = actionExceptionHandler.getAction();
              if (action != null) {
                AbstractNodeHandler.writeAction(action, xmlDump);
              }
              xmlDump.append("      </exceptionHandler>" + EOL);
              } else {
View Full Code Here

Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

                            exceptionScope = new ExceptionScope();
                            compositeNode.addContext(exceptionScope);
                            compositeNode.setDefaultContext(exceptionScope);
                        }
                        String escalationCode = (String) node.getMetaData().get("EscalationEvent");
                        ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
                        exceptionHandler.setAction(new DroolsConsequenceAction("java",
                            (cancelActivity ? "((org.jbpm.workflow.instance.NodeInstance) kcontext.getNodeInstance()).cancel();" : "") +
                            "kcontext.getProcessInstance().signalEvent(\"Escalation-" + attachedTo + "-" + escalationCode + "\", null);"));
                        exceptionScope.setExceptionHandler(escalationCode, exceptionHandler);
                    } else if (type.startsWith("Error-")) {
                        CompositeContextNode compositeNode = (CompositeContextNode) attachedNode;
                        ExceptionScope exceptionScope = (ExceptionScope)
                            compositeNode.getDefaultContext(ExceptionScope.EXCEPTION_SCOPE);
                        if (exceptionScope == null) {
                            exceptionScope = new ExceptionScope();
                            compositeNode.addContext(exceptionScope);
                            compositeNode.setDefaultContext(exceptionScope);
                        }
                        String errorCode = (String) node.getMetaData().get("ErrorEvent");
                        ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
                        exceptionHandler.setAction(new DroolsConsequenceAction("java",
                            "((org.jbpm.workflow.instance.NodeInstance) kcontext.getNodeInstance()).cancel();" +
                            "kcontext.getProcessInstance().signalEvent(\"Error-" + attachedTo + "-" + errorCode + "\", null);"));
                        exceptionScope.setExceptionHandler(errorCode, exceptionHandler);
                    } else if (type.startsWith("Timer-")) {
                        boolean cancelActivity = (Boolean) node.getMetaData().get("CancelActivity");
View Full Code Here

Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

    exceptionScope.setExceptionHandler(exception, exceptionHandler);
      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

Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

      getRuleFlowProcess().getExceptionScope().setExceptionHandler(exception, exceptionHandler);
      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

Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

        super(parentShell, "ExceptionHandlers", ExceptionHandlerDialog.class);
        this.process = process;
    }

    protected ActionExceptionHandler createItem() {
        return new ActionExceptionHandler();
    }
View Full Code Here

Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

        super(parentShell, "ExceptionHandlers", ExceptionHandlerDialog.class);
        this.process = process;
    }

    protected ActionExceptionHandler createItem() {
        return new ActionExceptionHandler();
    }
View Full Code Here

Examples of org.jbpm.process.core.context.exception.ActionExceptionHandler

        super(parentShell, "ExceptionHandlers", ExceptionHandlerDialog.class);
        this.process = process;
    }

    protected ActionExceptionHandler createItem() {
        return new ActionExceptionHandler();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.