Package org.openbp.core.engine

Examples of org.openbp.core.engine.EngineException


      }
    }
    if (mustExist)
    {
      String msg = LogUtil.error(getClass(), "Trying to access undefined process variable $0.", variableName);
      throw new EngineException("UndefinedProcessVariable", msg);
    }

    // Unknown process variable will cause result null in relaxed mode
    return null;
  }
View Full Code Here


          else
          {
            // Check if the value type matches the parameter type;
            // otherwise the application programmer obviously supplied the wrong type of data in the input parameters.
            if (! type.getJavaClass().isAssignableFrom(value.getClass()))
              throw new EngineException("IncorrectParameterType", "Cannot bind value of type "
                + value.getClass() + " to parameter '" + param.getQualifier() + "' (type "
                + type.getJavaClass() + ").");
          }
        }
      }
      catch (ValidationException e)
      {
        // Conversion failed, log the error
        throw new EngineException("ParamterValidation", "Error binding value of type " + (value != null ? value.getClass() : "?")
          + " to parameter '" + param.getQualifier() + "' (type " + type.getJavaClass() + ").", e);
      }
    }
    else
    {
      // Complex type; instantiate it if not present yet
      if (value != null)
      {
        if (! type.getJavaClass().isAssignableFrom(value.getClass()))
          throw new EngineException("IncorrectParameterType", "Cannot bind value of type " + value.getClass()
            + " to parameter '" + param.getQualifier() + "' (type " + type.getJavaClass() + ").");
      }
    }

    // Assign the result to the parameter
View Full Code Here

    // Execution will continue at the default exit socket when triggered by the application program.
    NodeSocket nextSocket = node.getDefaultExitSocket();
    if (nextSocket == null)
    {
      String msg = LogUtil.error(getClass(), "No default exit socket present for wait state node $0. [{1}]", node.getQualifier(), context);
      throw new EngineException("NoDefaultExitSocket", msg);
    }
    context.setCurrentSocket(nextSocket);
  }
View Full Code Here

    NodeSocket nextSocket = node.getDefaultExitSocket();
    if (nextSocket == null)
    {
      String msg = LogUtil.error(getClass(), "No default exit socket present for merge node $0. [{1}]", node.getQualifier(), context);
      throw new EngineException("NoDefaultExitSocket", msg);
    }
    context.setCurrentSocket(nextSocket);
  }
View Full Code Here

      }
    }
    catch (CloneNotSupportedException e)
    {
      String msg = LogUtil.error(EngineUtil.class, "Error cloning token. [{0}]", memContext, e);
      throw new EngineException("NoDefaultExitSocket", msg);
    }
    if (rollbackDataBehavior == RollbackDataBehavior.UPDATE_VARIABLES || rollbackDataBehavior == RollbackDataBehavior.ADD_VARIABLES)
    {
      memProcessVariables = copyProcessVariables(memContext, engine.getPersistenceContextProvider());
    }
View Full Code Here

            value = CopyUtil.copyObject(value, Copyable.COPY_DEEP, null);
          }
          catch (CloneNotSupportedException e)
          {
            String msg = LogUtil.error(EngineUtil.class, "Error cloning process variable $0 (value: $1). [{2}]", varName, value, context, e);
            throw new EngineException("NoDefaultExitSocket", msg);
          }
        }
      }

      map.put(varName, value);
View Full Code Here

      catch (Throwable t)
      {
        // Obviously, this is one of the famous serializable objects that are not serializable.
        String className = value != null ? value.getClass().getName() : "<unknown>";
        String msg = LogUtil.error(context.getClass(), "Error serializing token context: Serialization of object of type $0 (key $1) failed.", className, key, t);
        throw new EngineException("ContextSerialization", msg, t);
      }
    }

    // Write a stop signal (telling the reader that the key/value pair
    // stream ends here.
View Full Code Here

          readObject0(context, in, serializerRegistry);
        }
        else
        {
          String msg = LogUtil.error(context.getClass(), "Trying to deserialize a token with an unknown serial version number (level: $0). [{1}]", new Long(serialVersion), context);
          throw new EngineException("ContextDeserialization", msg);
        }
      }
    }
    else
    {
View Full Code Here

    throws IOException, ClassNotFoundException
  {
    if (initialObject != null && ! (initialObject instanceof CallStack))
    {
      String msg = LogUtil.error(context.getClass(), "Trying to deserialize a token and found an invalid initial object $0. [{1}]", initialObject, context);
      throw new EngineException("ContextDeserialization", msg);
    }
    CallStack callStack = (CallStack) initialObject;
    if (callStack != null)
    {
      callStack.setTokenContext(context);
View Full Code Here

    }
    catch (ClassNotFoundException e)
    {
      // This is unlikely
      String msg = LogUtil.error(context.getClass(), "Could not find class when deserializing token context value. [{0}]", context, e);
      throw new EngineException("ContextDeserialization", msg, e);
    }
    catch (IOException e)
    {
      // We've done in-memory I/O, so we hardly except it. Anyway: log it.
      String msg = LogUtil.error(context.getClass(), "Encountered I/O problem when deserializing token context value. [{0}]", context, e);
      throw new EngineException("ContextDeserialization", msg, e);
    }
  }
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.