Package org.uengine.kernel

Examples of org.uengine.kernel.UEngineException


   
    HashMap transformerByBand = new HashMap();
    try {
      ArrayList clsNames = getTransformerTypeList();
      if(clsNames==null || clsNames.size()==0)
        throw new UEngineException("No transformertypes.xml found by the ClassLoader. Please check the classpath.");
     
      ArrayList<JMenu> groupList = new ArrayList<JMenu>();
      for(Iterator iter = clsNames.iterator(); iter.hasNext();){
        Object tfDesc = iter.next();
       
View Full Code Here


      pd = (ProcessDefinitionDAO)ConnectiveDAO.createDAOImpl(tc, "select * from bpm_procdef where name=?name and isdeleted=0", ProcessDefinitionDAO.class);
      pd.setName(name);
      pd.getImplementationObject().setKeyField("DEFID");

      pd.select();
      if(!pd.next()) throw new UEngineException("No Such Process Definition named '" + name +"'.");
      tc.addTransactionListener(new TransactionListener(){

        public void beforeCommit(TransactionContext tx) throws Exception {
          pd.getImplementationObject().setTableName("bpm_procdef");
          pd.getImplementationObject().createUpdateSql();
View Full Code Here

      pd.setParentFolder(parent);
      pd.setObjType(objType);
      pd.getImplementationObject().setKeyField("DEFID");

      pd.select();
      if(!pd.next()) throw new UEngineException("No Such Process Definition named '" + name +"'.");
      tc.addTransactionListener(new TransactionListener(){

        public void beforeCommit(TransactionContext tx) throws Exception {
          pd.getImplementationObject().setTableName("bpm_procdef");
          pd.getImplementationObject().createUpdateSql();
View Full Code Here

      pd = (ProcessDefinitionDAO)ConnectiveDAO.createDAOImpl(tc, "select * from bpm_procdef where alias=?alias and isdeleted = 0", ProcessDefinitionDAO.class);
      pd.setAlias(alias);
      pd.getImplementationObject().setKeyField("DEFID");

      pd.select();
      if(!pd.next()) throw new UEngineException("No Such Process Definition aliased '" + alias +"'.");
      tc.addTransactionListener(new TransactionListener(){

        public void beforeCommit(TransactionContext tx) throws Exception {
          pd.getImplementationObject().setTableName("bpm_procdef");
          pd.getImplementationObject().createUpdateSql();
View Full Code Here

            }else{
              Method getter = bean.getClass().getMethod(methodName, new Class[]{ProcessInstance.class});
              bean = (Serializable) getter.invoke(bean, new Object[]{instance});
            }
          }catch (NoSuchMethodException e) {
            throw new UEngineException("No such bean property '" + partName + "' in object "+bean);
          }
        }
      }
    }
     
View Full Code Here

    return cls;
  }
 
  public static void setBeanProperty(Object bean, String key, Object propertyValue, ProcessInstance instance ,boolean ignoreBeanPropertyResolver) throws Exception{
   
    if(bean == null) throw new UEngineException("Bean object is null");
   
    //resolve parts
    String [] wholePartPath = key.replace('.','@').split("@");
    if(wholePartPath.length == 0){
      wholePartPath = new String[]{null};
View Full Code Here

      location.setLocation(location.getX() + parentLocation.x, location.getY() + parentLocation.getY());
      comp = comp.getParent();
    }
   
    if(comp.getParent()==null){
      throw new RuntimeException(new UEngineException("Couldn't find the container " + container + " from the parent stack."));
    }
   
    return location;
  }
View Full Code Here

      for(int i=0; i<scopesByTracingTag.length-1; i++){
        String scope = scopesByTracingTag[i];
        SubProcessActivity spAct = (SubProcessActivity)definition.getActivity(scope);
        List spInstanceIds = spAct.getSubprocessIds(instance);
        if(spInstanceIds.size() == 0){
          throw new UEngineException("Activity in the subprocess ["+ absoluteTracingTag +"] cannot be found.");
        }
       
        String spInstanceId = (String)spInstanceIds.get(0);
       
        instance = getProcessInstance(spInstanceId);
        definition = instance.getProcessDefinition();
      }
    }
   
    ActivityInstanceContext firstRunningActivityInstanceCtx = instance.getCurrentRunningActivity();
    HumanActivity humanActivity = (HumanActivity)firstRunningActivityInstanceCtx.getActivity();
   
    //HumanActivity humanActivity = (HumanActivity)initiatorHumanActivityReference.getActivity();
   
    if(humanActivity==null)
      throw new UEngineException("Inconsistent status. Couldn't find the initiator HumanActivity.");
     
    String message = humanActivity.getMessage();
   
    //add task id into payload
    String[] taskIds = humanActivity.getTaskIds(instance);

    if(!(instance instanceof DefaultProcessInstance) && (taskIds==null || taskIds.length<1)) throw new UEngineException("The first human work didn't start properly.");
 
    //TODO: kind of wierd code
    if(resultPayload!=null && taskIds!=null)
    resultPayload.setExtendedValue(
        new KeyedParameter(HumanActivity.PAYLOADKEY_TASKID, taskIds[0])
View Full Code Here

     
      if(varKey.indexOf('.') < 0){
        ProcessDefinition definition = instance.getProcessDefinition();
        ProcessVariable variable = definition.getProcessVariable(varKey);
       
        if(variable == null) throw new UEngineException("Undeclared process variable reference : " + varKey);
       
        ProcessVariableValue theValue = definition.getProcessVariable(varKey).getMultiple(instance, scope);
       
        //ProcessVariableValue theValue = instance.getMultiple(scope, varKey);
        theValue.beforeFirst();
View Full Code Here

 
  public void putRoleMapping(String instanceId, RoleMapping roleMapping) throws RemoteException{
    logInst("putRoleMapping", new Object[]{instanceId, roleMapping});
    try{
      if(!UEngineUtil.isNotEmpty(roleMapping.getName()))
        throw new UEngineException("RoleMapping should have its name.");
     
      ProcessInstance instance = getInstance(instanceId);     
      instance.putRoleMapping(roleMapping);
    }catch(Exception e){
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.uengine.kernel.UEngineException

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.