Package org.huihoo.workflow.xpdl

Examples of org.huihoo.workflow.xpdl.WorkflowParameter


  }

  public WorkflowParameter findWorkflowParameter(String paramId)
  {
    int sizeParam = parameters.size();
    WorkflowParameter parameter = null;
    for (int i = 0; i < sizeParam; ++i)
    {
      parameter = (WorkflowParameter) parameters.get(i);
      if (parameter.getUUID().equals(paramId))
      {
        return parameter;
      }
    }
    return null;
View Full Code Here


      return;
    }
   
    int sizeParam=paramList.size();
   
    WorkflowParameter parameter=null;
   
    for(int i=0;i<sizeParam;++i)
    {
      parameter=(WorkflowParameter)paramList.get(i);
      parameters.put(parameter.getUUID(),parameter);
    }
  }
View Full Code Here

    throws CloneNotSupportedException
  {
    WorkflowParameter[] params = null;

    FormalParameter formalParameter = null;
    WorkflowParameter initParameter = null;
    ActualParameter actualParameter = null;

    ParameterMode paramMode = null;
    Class srcClass = null;
    Class dstClass = null;

    int sizeParams = app.getFormalParameters().size();

    params = new WorkflowParameter[sizeParams];

    for (int i = 0; i < sizeParams; ++i)
    {
      formalParameter = app.findFormalParameter(i);
      actualParameter = (ActualParameter) parameters.get(i);
      initParameter = workflowCase.getCaseContext().getParameterByName(actualParameter.getUUID());

      srcClass = formalParameter.getType();
      dstClass = initParameter.getType();
      paramMode = formalParameter.getMode();

      if (dstClass.equals(srcClass))
      {
        if (paramMode.equals(ParameterMode.MODE_IN))
        {
          params[i] = initParameter.copy();
        }
        else
        {
          params[i] = initParameter;
        }
View Full Code Here

    String processId = workflowProcess.getUUID();
    String packageId = workflowProcess.getWorkflowPackage().getUUID();
    String caseId = workflowCase.getUUID();

    List paramList = new ArrayList();
    WorkflowParameter parameter = null;

    String strSQL =
      "SELECT vc_uuid,vc_type,vc_value FROM "
        + schemaContext.getTableName(SchemaContext.SCHEMA_CASE_DATAFIELD)
        + " "
        + "WHERE  vc_packageId=?"
        + " "
        + "AND    vc_processid=?"
        + " "
        + "AND    vc_caseId=?";

    Connection conn = null;
    PreparedStatement pstmt = null;
    ResultSet jrs = null;

    try
    {
      conn = ConnUtils.getConnection(storeConfig);
      pstmt = conn.prepareStatement(strSQL);
      pstmt.setString(1, packageId);
      pstmt.setString(2, processId);
      pstmt.setString(3, caseId);

      jrs = pstmt.executeQuery();

      String vc_uuid = null;
      String vc_type = null;
      String vc_value = null;

      while (jrs.next())
      {
        vc_uuid = jrs.getString("vc_uuid");
        vc_type = jrs.getString("vc_type");
        vc_value = jrs.getString("vc_value");

        parameter = new WorkflowParameter(vc_uuid, vc_uuid, TypeDefinition.XPDLToJava(vc_type));
        parameter.setValue(ConvertUtils.convert(vc_value, parameter.getType()));
        paramList.add(parameter);
      }

    }
    finally
View Full Code Here

    }
   
    int sizeParam = parameters.size();
    for (int i = 0; i < sizeParam; ++i)
    {
      WorkflowParameter  parameter = (WorkflowParameter) parameters.get(i);
      if (paramId.equals(parameter.getUUID()))
      {
        return parameter;
      }
    }
    return null;
View Full Code Here

    }
   
    int sizeParam = parameters.size();
    for (int i = 0; i < sizeParam; ++i)
    {
      WorkflowParameter  parameter = (WorkflowParameter) parameters.get(i);
      if (paramNameOrID.equals(parameter.getName()))
      {
        return parameter;
      }
    }
    return null;
View Full Code Here

      {
        pstmt = conn.prepareStatement(strSQL);

        for (int i = 0; i < sizeParam; ++i)
        {
          WorkflowParameter parameter = (WorkflowParameter) paramList.get(i);
          pstmt.setString(1, pkgId);
          pstmt.setString(2, processId);
          pstmt.setString(3, caseId);
         
          pstmt.setString(4, parameter.getUUID());
          pstmt.setString(5,TypeDefinition.javaToXPDL(parameter.getType()));
          pstmt.setString(6, valueOf(parameter.getValue()));

          pstmt.addBatch();
        }
       
        pstmt.executeBatch();
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.xpdl.WorkflowParameter

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.