Examples of ExceptionScope


Examples of org.drools.process.core.context.exception.ExceptionScope

        ((CompositeContextNode) compositeNode).getDefaultContext(VariableScope.VARIABLE_SCOPE);
          if (variableScope != null) {
            List<Variable> variables = variableScope.getVariables();
            XmlWorkflowProcessDumper.visitVariables(variables, xmlDump);
          }
          ExceptionScope exceptionScope = (ExceptionScope)
        ((CompositeContextNode) compositeNode).getDefaultContext(ExceptionScope.EXCEPTION_SCOPE);
        if (exceptionScope != null) {
          XmlWorkflowProcessDumper.visitExceptionHandlers(
            exceptionScope.getExceptionHandlers(), xmlDump);
        }
        }
        List<Node> subNodes = getSubNodes(compositeNode);
        xmlDump.append("      <nodes>" + EOL);
        for (Node subNode: subNodes) {
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

    public void buildContexts(ContextContainer contextContainer, ProcessBuildContext buildContext) {
      List<Context> exceptionScopes = contextContainer.getContexts(ExceptionScope.EXCEPTION_SCOPE);
      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() );  
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

        compositeNode.setName("Composite");
        VariableScope variableScope = new VariableScope();
        compositeNode.addContext(variableScope);
        compositeNode.setDefaultContext(variableScope);
        variableScope.setVariables(variables);
        ExceptionScope exceptionScope = new ExceptionScope();
        compositeNode.addContext(exceptionScope);
        compositeNode.setDefaultContext(exceptionScope);
        exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable");
        action = new DroolsConsequenceAction("dialect", "consequence");
        exceptionHandler.setAction(action);
        exceptionScope.setExceptionHandler("MyFault", exceptionHandler);
        exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable2");
        action = new DroolsConsequenceAction("dialect2", "consequence2");
        exceptionHandler.setAction(action);
        exceptionScope.setExceptionHandler("MyFault2", exceptionHandler);
        subActionNode1 = new ActionNode();
        compositeNode.addNode(subActionNode1);
        subActionNode2 = new ActionNode();
        compositeNode.addNode(subActionNode2);
        new ConnectionImpl(subActionNode1, Node.CONNECTION_DEFAULT_TYPE, subActionNode2, Node.CONNECTION_DEFAULT_TYPE);
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

        compositeNode.setName("Composite");
        VariableScope variableScope = new VariableScope();
        compositeNode.addContext(variableScope);
        compositeNode.setDefaultContext(variableScope);
        variableScope.setVariables(variables);
        ExceptionScope exceptionScope = new ExceptionScope();
        compositeNode.addContext(exceptionScope);
        compositeNode.setDefaultContext(exceptionScope);
        exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable");
        action = new DroolsConsequenceAction("dialect", "consequence");
        exceptionHandler.setAction(action);
        exceptionScope.setExceptionHandler("MyFault", exceptionHandler);
        exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable2");
        action = new DroolsConsequenceAction("dialect2", "consequence2");
        exceptionHandler.setAction(action);
        exceptionScope.setExceptionHandler("MyFault2", exceptionHandler);
        subActionNode1 = new ActionNode();
        compositeNode.addNode(subActionNode1);
        subActionNode2 = new ActionNode();
        compositeNode.addNode(subActionNode2);
        new ConnectionImpl(subActionNode1, Node.CONNECTION_DEFAULT_TYPE, subActionNode2, Node.CONNECTION_DEFAULT_TYPE);
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

        compositeNode.setName("Composite");
        VariableScope variableScope = new VariableScope();
        compositeNode.addContext(variableScope);
        compositeNode.setDefaultContext(variableScope);
        variableScope.setVariables(variables);
        ExceptionScope exceptionScope = new ExceptionScope();
        compositeNode.addContext(exceptionScope);
        compositeNode.setDefaultContext(exceptionScope);
        exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable");
        action = new DroolsConsequenceAction("dialect", "consequence");
        exceptionHandler.setAction(action);
        exceptionScope.setExceptionHandler("MyFault", exceptionHandler);
        exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable2");
        action = new DroolsConsequenceAction("dialect2", "consequence2");
        exceptionHandler.setAction(action);
        exceptionScope.setExceptionHandler("MyFault2", exceptionHandler);
        subActionNode1 = new ActionNode();
        compositeNode.addNode(subActionNode1);
        subActionNode2 = new ActionNode();
        compositeNode.addNode(subActionNode2);
        new ConnectionImpl(subActionNode1, Node.CONNECTION_DEFAULT_TYPE, subActionNode2, Node.CONNECTION_DEFAULT_TYPE);
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

        ((CompositeContextNode) compositeNode).getDefaultContext(VariableScope.VARIABLE_SCOPE);
          if (variableScope != null) {
            List<Variable> variables = variableScope.getVariables();
            XmlWorkflowProcessDumper.visitVariables(variables, xmlDump);
          }
          ExceptionScope exceptionScope = (ExceptionScope)
        ((CompositeContextNode) compositeNode).getDefaultContext(ExceptionScope.EXCEPTION_SCOPE);
        if (exceptionScope != null) {
          XmlWorkflowProcessDumper.visitExceptionHandlers(
            exceptionScope.getExceptionHandlers(), xmlDump);
        }
        }
        List<Node> subNodes = getSubNodes(compositeNode);
        xmlDump.append("      <nodes>" + EOL);
        for (Node subNode: subNodes) {
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

    public void buildContexts(ContextContainer contextContainer, ProcessBuildContext buildContext) {
      List<Context> exceptionScopes = contextContainer.getContexts(ExceptionScope.EXCEPTION_SCOPE);
      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() );  
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

   
    if (faultVariable != null && faultVariable.length() > 0) {
      exceptionHandler.setFaultVariable(faultVariable);
    }
   
    ExceptionScope exceptionScope = (ExceptionScope)
      contextContainer.getDefaultContext(ExceptionScope.EXCEPTION_SCOPE);
    if (exceptionScope == null) {
      exceptionScope = new ExceptionScope();
          contextContainer.addContext(exceptionScope);
          contextContainer.setDefaultContext(exceptionScope);
    }
   
    exceptionScope.setExceptionHandler(faultName, exceptionHandler);

    return null;
  }
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

        SwimlaneContext swimlaneContext = (SwimlaneContext)
          ((org.drools.process.core.Process) process).getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContext != null) {
            visitSwimlanes(swimlaneContext.getSwimlanes(), xmlDump);
        }
        ExceptionScope exceptionScope = (ExceptionScope)
          ((org.drools.process.core.Process) process).getDefaultContext(ExceptionScope.EXCEPTION_SCOPE);
        if (exceptionScope != null) {
            visitExceptionHandlers(exceptionScope.getExceptionHandlers(), xmlDump);
        }
        xmlDump.append("  </header>" + EOL + EOL);
    }
View Full Code Here

Examples of org.drools.process.core.context.exception.ExceptionScope

    public void buildContexts(ContextContainer contextContainer, ProcessBuildContext buildContext) {
      List<Context> exceptionScopes = contextContainer.getContexts(ExceptionScope.EXCEPTION_SCOPE);
      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() );  
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.