Exemplo n.º 1
0
 public void execute(
     Object parameter,
     SqlCommand sqlCommand,
     ProcessEngineConfigurationImpl processEngineConfiguration) {
   IdentityLinkEntity identityLink = (IdentityLinkEntity) parameter;
   sqlCommand.insert(
       TableUtil.getTaskTdentityLinkRunTableName(), identityLink.getPersistentDbMap());
 }
  /*
   * @param processInstanceQuery
   * @return
   */
  public long selectProcessInstanceCountByQueryCriteria(
      ProcessInstanceQueryImpl processInstanceQuery) {
    String sqlString = " select count(*) ";
    List<Object> objectParamWhere = new ArrayList<Object>();

    ProcessInstanceQueryScript processInstanceQueryScript = new ProcessInstanceQueryScript();

    sqlString =
        processInstanceQueryScript.selectProcessInstanceByQueryCriteriaSql(
            sqlString, processInstanceQuery, objectParamWhere, sqlCommand);
    Object returnObj = sqlCommand.queryForValue(sqlString, objectParamWhere);
    return Integer.parseInt(returnObj.toString());
  }
  public void execute(
      Object parameter,
      SqlCommand sqlCommand,
      ProcessEngineConfigurationImpl processEngineConfiguration) {

    ProcessInstanceEntity processInstance = (ProcessInstanceEntity) parameter;
    Object[] objectParamWhere = new Object[1];
    objectParamWhere[0] = processInstance.getId();
    sqlCommand.update(
        TableUtil.getProcessInstanceRunTableName(),
        processInstance.getPersistentDbMap(),
        " PROCESSINSTANCE_ID=?",
        objectParamWhere);
  }