Package org.fireflow.engine.definition

Examples of org.fireflow.engine.definition.WorkflowDefinition


    Query query = em.createQuery(hql);
    List processIdList = query.getResultList();
    List _result = new Vector<WorkflowDefinition>();
    for (int i = 0; i < processIdList.size(); i++)
    {
      WorkflowDefinition wfDef = findTheLatestVersionOfWorkflowDefinitionByProcessId((String) processIdList
          .get(i));
      _result.add(wfDef);
    }
    return _result;
  }
View Full Code Here


      }
      else
      {
        return new ArrayList<IWorkItem>();
      }
      WorkflowDefinition workflowDefinition = null;
      for(int i=0;i<workflowDefinitions.size();i++)
      {
        workflowDefinition = workflowDefinitions.get(i);
        if(i == 0)
        {
          hsql += "(wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
        else
        {
          hsql += " or (wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
      }
      hsql += ")";
    }
    hsql += " order by wi.endTime desc";
View Full Code Here

      }
      else
      {
        return new ArrayList<IWorkItem>();
      }
      WorkflowDefinition workflowDefinition = null;
      for(int i=0;i<workflowDefinitions.size();i++)
      {
        workflowDefinition = workflowDefinitions.get(i);
        if(i == 0)
        {
          hsql += "(wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
        else
        {
          hsql += " or (wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
      }
      hsql += ")";
    }
    hsql += " order by wi.createdTime desc";
View Full Code Here

      }
      else
      {
        return 0;
      }
      WorkflowDefinition workflowDefinition = null;
      for(int i=0;i<workflowDefinitions.size();i++)
      {
        workflowDefinition = workflowDefinitions.get(i);
        if(i == 0)
        {
          hsql += "(wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
        else
        {
          hsql += " or (wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
      }
      hsql += ")";
    }
   
View Full Code Here

      }
      else
      {
        return 0;
      }
      WorkflowDefinition workflowDefinition = null;
      for(int i=0;i<workflowDefinitions.size();i++)
      {
        workflowDefinition = workflowDefinitions.get(i);
        if(i == 0)
        {
          hsql += "(wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
        else
        {
          hsql += " or (wi.taskInstance.processId='"+workflowDefinition.getProcessId()+"' and wi.taskInstance.version="+workflowDefinition.getVersion()+")";
        }
      }
      hsql += ")";
    }
View Full Code Here

      }
      else
      {
        return new ArrayList<IProcessInstance>();
      }
      WorkflowDefinition workflowDefinition = null;
      for(int i=0;i<workflowDefinitions.size();i++)
      {
        workflowDefinition = workflowDefinitions.get(i);
        if(i == 0)
        {
          hsql += "(pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
        }
        else
        {
          hsql += " or (pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
        }
      }
      hsql += ")";
    }
    hsql += " order by pi.createdTime desc";
View Full Code Here

      }
      else
      {
        return 0;
      }
      WorkflowDefinition workflowDefinition = null;
      for(int i=0;i<workflowDefinitions.size();i++)
      {
        workflowDefinition = workflowDefinitions.get(i);
        if(i == 0)
        {
          hsql += "(pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
        }
        else
        {
          hsql += " or (pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
        }
      }
      hsql += ")";
    }
   
View Full Code Here

    }
    else
    {
      return new ArrayList<IProcessInstance>();
    }
    WorkflowDefinition workflowDefinition = null;
    for(int i=0;i<workflowDefinitions.size();i++)
    {
      workflowDefinition = workflowDefinitions.get(i);
      if(i == 0)
      {
        hsql += "(pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
      }
      else
      {
        hsql += " or (pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
      }
    }
    hsql += " order by pi.createdTime desc";
   
    Query query = em.createQuery(hsql);
View Full Code Here

      final String creatorId, final String parentProcessInstanceId,
      final String parentTaskInstanceId) throws EngineException,
      KernelException {
    final String wfprocessId = workflowProcessId;
   
    final WorkflowDefinition workflowDef = runtimeContext.getDefinitionService().getTheLatestVersionOfWorkflowDefinition(wfprocessId);
    final WorkflowProcess wfProcess = workflowDef.getWorkflowProcess();

    if (wfProcess == null) {
      throw new RuntimeException(
          "Workflow process NOT found,id=[" + wfprocessId
              + "]");
    }
    IProcessInstance processInstance =  (IProcessInstance) this.execute(new IWorkflowSessionCallback() {

      public Object doInWorkflowSession(RuntimeContext ctx)
          throws EngineException, KernelException {

        ProcessInstance processInstance = new ProcessInstance();
        processInstance.setCreatorId(creatorId);
        processInstance.setProcessId(wfProcess.getId());
        processInstance.setVersion(workflowDef.getVersion());
        processInstance.setDisplayName(wfProcess.getDisplayName());
        processInstance.setName(wfProcess.getName());
        processInstance.setState(IProcessInstance.INITIALIZED);
        processInstance.setCreatedTime(ctx.getCalendarService()
            .getSysDate());
View Full Code Here

    }
    else
    {
      return 0;
    }
    WorkflowDefinition workflowDefinition = null;
    for(int i=0;i<workflowDefinitions.size();i++)
    {
      workflowDefinition = workflowDefinitions.get(i);
      if(i == 0)
      {
        hsql += "(pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
      }
      else
      {
        hsql += " or (pi.processId='"+workflowDefinition.getProcessId()+"' and pi.version="+workflowDefinition.getVersion()+")";
      }
    }
   
    Query query = em.createQuery(hsql);
    Object result = query.getSingleResult();
View Full Code Here

TOP

Related Classes of org.fireflow.engine.definition.WorkflowDefinition

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.