Package org.openbp.core.engine

Examples of org.openbp.core.engine.EngineException


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

    Object collectionParamValue = TokenContextUtil.getParamValue(context, entrySocket, CoreConstants.FORK_COLLECTION_PARAM);
    if (collectionParamValue != null)
    {
      // Automatic fork node based on input collection
      if (defaultOutSocket.getParamByName(CoreConstants.FORK_COLLECTION_ELEMENT_PARAM) == null)
      {
        String msg = LogUtil.error(getClass(), "Fork node having a $0 input parameter requires a $1 output parameter. [{2}]", CoreConstants.FORK_COLLECTION_PARAM, CoreConstants.FORK_COLLECTION_ELEMENT_PARAM, context);
        throw new EngineException("NoCollectionElementForFork", msg);
      }

      Iterator it = CollectionUtil.iterator(collectionParamValue);
      while (it.hasNext())
      {
View Full Code Here


      Node subprocessInitialNode = subprocess.getNodeByName(entryName);

      if (subprocessInitialNode == null)
      {
        String msg = LogUtil.error(getClass(), "Initial node $0 called by $1 not found in process $2. [{3}]", entryName, node.getQualifier(), subprocess.getQualifier(), context);
        throw new EngineException("InitialNodeNotFound", msg);
      }

      if (!(subprocessInitialNode instanceof InitialNode))
      {
        String msg = LogUtil.error(getClass(), "Node $0 called by $1 is not an initial node. [{2}]", subprocessInitialNode.getQualifier(), node.getQualifier(), context);
        throw new EngineException("NotAnInitialNode", msg);
      }

      // Continue with the initial node of the sub process
      nextSocket = subprocessInitialNode.getDefaultExitSocket();
      if (nextSocket == null)
      {
        String msg = LogUtil.error(getClass(), "No default exit socket present for sub process initial node $0. [{1}]", subprocessInitialNode.getQualifier(), context);
        throw new EngineException("NoDefaultExitSocket", msg);
      }

      // Push the current position onto the call stack
      context.getCallStack().pushSubprocess(entrySocket);

      // Create the process variables of the subprocess
      EngineUtil.createProcessVariables(subprocess, context);

      // Copy the data of the node entry socket in the current context
      // to the initial node of the sub process in the new context
      EngineUtil.copySocketData(entrySocket, context, nextSocket, context);
    }
    else
    {
      String msg = LogUtil.error(getClass(), "Missing sub process for sub process node $0. [{1}]", node.getQualifier(), context);
      throw new EngineException("MissingSubprocess", msg);
    }

    context.setCurrentSocket(nextSocket);
  }
View Full Code Here

        return executor;
      }
      catch (ReflectException e)
      {
        String msg = LogUtil.error(getClass(), "Cannot execute model object $0.", mo.getQualifier(), e);
        throw new EngineException("ModelObjectExecutorInstantiation", msg);
      }
    }

    String msg = LogUtil.error(getClass(), "Cannot execute model object $0 of type $1: No model object executor found.", mo.getQualifier(), mo.getClass().getName());
    throw new EngineException("ModelObjectExecutorPresence", msg);
  }
View Full Code Here

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

      {
        empty = ((Map) collection).isEmpty();
      }
      else
      {
        throw new EngineException("IteratableUnsupported", "IsCollectionEmptyActivity: Param of type '" + collection.getClass() + "' is not a supported iteratable object");
      }
    }

    if (empty)
      hc.chooseExitSocket(SOCKET_YES);
View Full Code Here

          if (! CommonUtil.equalsNull(value, actualValue))
            return false;
        }
        catch (PropertyException e)
        {
          throw new EngineException("Expression.CustomCriteriumPropertyAccessFailed", e);
        }
      }
    }
    return true;
  }
View Full Code Here

        remoteConnectorServer.bindToRegistry();
      }
    }
    catch (Exception e)
    {
      throw new EngineException("Initialization", "Error initializing services.", e);
    }
  }
View Full Code Here

      // Get the iterator we saved at the start of the node
      it = (Iterator) hc.getTokenContext().getParamValue(nodePath + PARAM_DELIMITER + STORE_ITERATOR);

      if (it == null)
      {
        throw new EngineException("UninitializedLoop", "LoopActivity: Socket '" + SOCKET_IN + "' socket must be executed before socket '" + SOCKET_LOOP + "'");
      }
    }

    if (it.hasNext())
    {
View Full Code Here

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

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

    String clsName = getClassName();

    if (clsName == null)
    {
      String msg = LogUtil.error(getClass(), "Missing class name for type $0.", this.getQualifier());
      throw new EngineException("NoClassNameForType", msg);
    }

    return clsName;
  }
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.