Package org.openbp.core.engine

Examples of org.openbp.core.engine.EngineException


          currentNode.getDefaultExitSocket());
        if (hc != null && hc.hasNextSocketChanged())
        {
          // Handler changed the flow of control...
          if (hc.getNextSocket() == null)
            throw new EngineException("MissingNextSocket", "Handler of node  '" + currentNode.getQualifier()
              + "' has set a null next socket.\nThe process cannot be continued.");
          context.setCurrentSocket(hc.getNextSocket());
          return;
        }
View Full Code Here


        String msg = LogUtil.error(getClass(),
          "Unconnected socket encountered and no $0 initial node present in process $1 (current position: $2). [{3}]", new Object[]
          {
            nextName, process.getQualifier(), exitSocket.getQualifier(), context
          });
        throw new EngineException("UnconnectedSocket", msg);
      }

      // Copy the data of the current exit socket to the newly determined exit socket
      EngineUtil.copySocketData(exitSocket, context, nextSocket, context);
      context.setCurrentSocket(nextSocket);
View Full Code Here

      if (node != null)
      {
        if (! (node instanceof InitialNode))
        {
          String msg = LogUtil.error(getClass(), "Error node $0 must be an initial node. [{0}]", node.getQualifier(), context);
          throw new EngineException("InvalidErrorNode", msg);
        }
        socket = ((InitialNode) node).getDefaultExitSocket();
      }
    }
    return socket;
View Full Code Here

          }
        }

        if (required && value == null)
          // This is an error in this case
          throw new EngineException("RequiredParameterMissing", "Required parameter '" + param.getQualifier() + "' not present");
      }
    }
  }
View Full Code Here

      {
        value = CopyUtil.copyObject(value, Copyable.COPY_DEEP, context.getExecutingModel().getClassLoader());
      }
      catch (Exception e)
      {
        throw new EngineException("Clone", "Cloning of data link value failed.", e);
      }
    }

    //
    // Set the target value
View Full Code Here

      nextSocket = hc.getNextSocket();
      if (nextSocket == null)
      {
        String msg = LogUtil.error(getClass(), "Handler of activity $0 did not provide a a socket to continue with. [{1}]", activity.getQualifier(), context);
        throw new EngineException("MissingNextSocket", msg);
      }
    }

    if (nextSocket != null)
    {
View Full Code Here

    if (error != null)
    {
      throw new ScriptTargetException(msg, error);
    }

    throw new EngineException("ScriptExecutionFailed", msg, error);
  }
View Full Code Here

    {
      Object actualValue = hc.getTokenContext().getProcessVariableValue(variableName);
      if (actualValue != null)
      {
        String msg = LogUtil.error(getClass(), "Test case assert failed: Expected null value for variable $0, actual value: $1", variableName, actualValue);
        throw new EngineException("TestCaseAssertFailed", msg);
      }
    }
    else if ("<notnull>".equals(expectedValue))
    {
      Object actualValue = hc.getTokenContext().getProcessVariableValue(variableName);
      if (actualValue == null)
      {
        String msg = LogUtil.error(getClass(), "Test case assert failed: Expected non-null value for variable $0, actual value: $1", variableName, actualValue);
        throw new EngineException("TestCaseAssertFailed", msg);
      }
    }
    else if ("<present>".equals(expectedValue))
    {
      if (! hc.getTokenContext().hasProcessVariableValue(variableName))
      {
        String msg = LogUtil.error(getClass(), "Test case assert failed: Process variable $0 is not present, but should be", variableName);
        throw new EngineException("TestCaseAssertFailed", msg);
      }
    }
    else if ("<notpresent>".equals(expectedValue))
    {
      if (hc.getTokenContext().hasProcessVariableValue(variableName))
      {
        String msg = LogUtil.error(getClass(), "Test case assert failed: Process variable $0 is present, but should not be", variableName);
        throw new EngineException("TestCaseAssertFailed", msg);
      }
    }
    else
    {
      Object actualValue = hc.getTokenContext().getProcessVariableValue(variableName);
      if (! CommonUtil.equalsNull(expectedValue, actualValue))
      {
        String msg = LogUtil.error(getClass(), "Test case assert failed: Expected value for variable $0: $1, actual value: $2", variableName, expectedValue, actualValue);
        throw new EngineException("TestCaseAssertFailed", msg);
      }
    }

    return true;
  }
View Full Code Here

      rollbackDataBehavior = RollbackDataBehavior.RESTORE_VARIABLES;;
    }
    else
    {
      String msg = LogUtil.error(getClass(), "Invalid $0 activity argument (argument value $1, token $2).", PARAM_ROLLBACKDATABEHAVIOR, rollbackDataBehaviorStr, hc.getTokenContext());
      throw new EngineException("InvalidActivityArgument", msg);
    }

    String rollbackPositionBehaviorStr = (String) hc.getParam(PARAM_ROLLBACKPOSITIONBEHAVIOR);
    int rollbackPositionBehavior = RollbackPositionBehavior.MAINTAIN_POSITION;;
    if ("MaintainPosition".equals(rollbackPositionBehaviorStr))
    {
      rollbackPositionBehavior = RollbackPositionBehavior.MAINTAIN_POSITION;;
    }
    else if ("RestorePosition".equals(rollbackPositionBehaviorStr))
    {
      rollbackPositionBehavior = RollbackPositionBehavior.RESTORE_POSITION;;
    }
    else
    {
      String msg = LogUtil.error(getClass(), "Invalid $0 activity argument (argument value $1, token $2).", PARAM_ROLLBACKPOSITIONBEHAVIOR, rollbackPositionBehaviorStr, hc.getTokenContext());
      throw new EngineException("InvalidActivityArgument", msg);
    }

    StandardRollbackProcessor rollbackProcessor = new StandardRollbackProcessor();
    rollbackProcessor.setRollbackDataBehavior(rollbackDataBehavior);
    rollbackProcessor.setRollbackPositionBehavior(rollbackPositionBehavior);
View Full Code Here

TOP

Related Classes of org.openbp.core.engine.EngineException

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.