Examples of WorkflowDefinition


Examples of org.fireflow.engine.definition.WorkflowDefinition

    /* (non-Javadoc)
     * @see org.fireflow.engine.persistence.IPersistenceService#findWorkflowDefinitionByProcessIdAndVersionNumber(java.lang.String, int)
     */
    public WorkflowDefinition findWorkflowDefinitionByProcessIdAndVersionNumber(final String processId, final int version) {
        WorkflowDefinition workflowDef = (WorkflowDefinition) this.getHibernateTemplate().execute(new HibernateCallback() {

            public Object doInHibernate(Session arg0) throws HibernateException, SQLException {
                Criteria c = arg0.createCriteria(WorkflowDefinition.class);
                c.add(Expression.eq("processId", processId));
                c.add(Expression.eq("version", version));
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

                Query query = arg0.createQuery(hql);
                List<String> processIdList = query.list();
               
                List<WorkflowDefinition> _result = new ArrayList<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

Examples of org.fireflow.engine.definition.WorkflowDefinition

    return (WorkflowDefinition) super.getJdbcTemplate().queryForObject(sql, new Object[] { id }, new RowMapper()
    {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException
      {

        WorkflowDefinition workFlowDefinition = new WorkflowDefinition();
        workFlowDefinition.setId(rs.getString("id"));
        workFlowDefinition.setDefinitionType(rs.getString("definition_type"));
        workFlowDefinition.setProcessId(rs.getString("process_id"));
        workFlowDefinition.setName(rs.getString("name"));
        workFlowDefinition.setDisplayName(rs.getString("display_name"));

        workFlowDefinition.setDescription(rs.getString("description"));
        workFlowDefinition.setVersion(rs.getInt("version"));
        workFlowDefinition.setState(rs.getInt("state") == 1 ? true : false);
        workFlowDefinition.setUploadUser(rs.getString("upload_user"));
        workFlowDefinition.setUploadTime(rs.getTimestamp("upload_time"));

        workFlowDefinition.setPublishUser(rs.getString("publish_user"));
        workFlowDefinition.setPublishTime(rs.getTimestamp("publish_time"));
        // 读取blob大字段
        workFlowDefinition.setProcessContent(lobHandler.getClobAsString(rs, "process_content"));
        return workFlowDefinition;
      }
    });

  }
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

        new RowMapper()
        {
          public Object mapRow(ResultSet rs, int rowNum) throws SQLException
          {

            WorkflowDefinition workFlowDefinition = new WorkflowDefinition();
            workFlowDefinition.setId(rs.getString("id"));
            workFlowDefinition.setDefinitionType(rs.getString("definition_type"));
            workFlowDefinition.setProcessId(rs.getString("process_id"));
            workFlowDefinition.setName(rs.getString("name"));
            workFlowDefinition.setDisplayName(rs.getString("display_name"));

            workFlowDefinition.setDescription(rs.getString("description"));
            workFlowDefinition.setVersion(rs.getInt("version"));
            workFlowDefinition.setState(rs.getInt("state") == 1 ? true : false);
            workFlowDefinition.setUploadUser(rs.getString("upload_user"));
            workFlowDefinition.setUploadTime(rs.getTimestamp("upload_time"));

            workFlowDefinition.setPublishUser(rs.getString("publish_user"));
            workFlowDefinition.setPublishTime(rs.getTimestamp("publish_time"));
            // 读取blob大字段
            workFlowDefinition.setProcessContent(lobHandler.getClobAsString(rs, "process_content"));
            return workFlowDefinition;
          }
        });
  }
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

    return super.getJdbcTemplate().query(sql, new Object[] { processId }, new RowMapper()
    {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException
      {

        WorkflowDefinition workFlowDefinition = new WorkflowDefinition();
        workFlowDefinition.setId(rs.getString("id"));
        workFlowDefinition.setDefinitionType(rs.getString("definition_type"));
        workFlowDefinition.setProcessId(rs.getString("process_id"));
        workFlowDefinition.setName(rs.getString("name"));
        workFlowDefinition.setDisplayName(rs.getString("display_name"));

        workFlowDefinition.setDescription(rs.getString("description"));
        workFlowDefinition.setVersion(rs.getInt("version"));
        workFlowDefinition.setState(rs.getInt("state") == 1 ? true : false);
        workFlowDefinition.setUploadUser(rs.getString("upload_user"));
        workFlowDefinition.setUploadTime(rs.getTimestamp("upload_time"));

        workFlowDefinition.setPublishUser(rs.getString("publish_user"));
        workFlowDefinition.setPublishTime(rs.getTimestamp("publish_time"));
        // 读取blob大字段
        workFlowDefinition.setProcessContent(lobHandler.getClobAsString(rs, "process_content"));
        return workFlowDefinition;
      }
    });

  }
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

    /* (non-Javadoc)
     * @see org.fireflow.engine.IProcessInstance#getWorkflowProcess()
     */
    public WorkflowProcess getWorkflowProcess() throws EngineException {
        WorkflowDefinition workflowDef = rtCtx.getDefinitionService().getWorkflowDefinitionByProcessIdAndVersionNumber(this.getProcessId(), this.getVersion());
        WorkflowProcess workflowProcess = null;

        workflowProcess = workflowDef.getWorkflowProcess();

        return workflowProcess;
    }
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

      return null;
    }
    List<WorkflowDefinition> _result = new ArrayList<WorkflowDefinition>();
    for (String str : l)
    {
      WorkflowDefinition wfDef = findTheLatestVersionOfWorkflowDefinitionByProcessId(str);
      _result.add(wfDef);
    }
    return _result;
  }
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

                    "DefaultSubflowTaskInstanceRunner:TaskInstance的任务类型错误,只能为SUBFLOW类型");
        }
        Task task = taskInstance.getTask();
        SubWorkflowProcess Subflow = ((SubflowTask) task).getSubWorkflowProcess();

        WorkflowDefinition subWorkflowDef = runtimeContext.getDefinitionService().getTheLatestVersionOfWorkflowDefinition(Subflow.getWorkflowProcessId());
        if (subWorkflowDef == null) {
            WorkflowProcess parentWorkflowProcess = taskInstance.getWorkflowProcess();
            throw new EngineException(taskInstance.getProcessInstanceId(), parentWorkflowProcess,
                    taskInstance.getTaskId(),
                    "系统中没有Id为" + Subflow.getWorkflowProcessId() + "的流程定义");
        }
        WorkflowProcess subWorkflowProcess = subWorkflowDef.getWorkflowProcess();

        if (subWorkflowProcess == null) {
            WorkflowProcess parentWorkflowProcess = taskInstance.getWorkflowProcess();
            throw new EngineException(taskInstance.getProcessInstanceId(), parentWorkflowProcess,
                    taskInstance.getTaskId(),
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

     */
    public Task getTask() throws EngineException {
      if (rtCtx==null)System.out.println("====Inside taskInstance rtCtx is null");
      IDefinitionService definitionService = rtCtx.getDefinitionService();
      if (definitionService==null)System.out.println("====Inside taskInstance definitionService is null");
        WorkflowDefinition workflowDef = definitionService.getWorkflowDefinitionByProcessIdAndVersionNumber(this.getProcessId(), this.getVersion());
        if (workflowDef == null) {
            return null;
        }

        return (Task) workflowDef.getWorkflowProcess().findWFElementById(this.getTaskId());

    }
View Full Code Here

Examples of org.fireflow.engine.definition.WorkflowDefinition

    /* (non-Javadoc)
     * @see org.fireflow.engine.ITaskInstance#getActivity()
     */
    public Activity getActivity() throws EngineException {
        WorkflowDefinition workflowDef = rtCtx.getDefinitionService().getWorkflowDefinitionByProcessIdAndVersionNumber(this.getProcessId(), this.getVersion());
        if (workflowDef == null) {
            return null;
        }
        return (Activity) workflowDef.getWorkflowProcess().findWFElementById(this.getActivityId());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.