Merged colosa/processmaker into master
This commit is contained in:
@@ -923,6 +923,7 @@ class Applications
|
||||
|
||||
$stepItem['title'] = $oDocument->getDynTitle();
|
||||
$stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=EDIT";
|
||||
$stepItem['version'] = $oDocument->getDynVersion();
|
||||
break;
|
||||
case 'OUTPUT_DOCUMENT':
|
||||
$oDocument = OutputDocumentPeer::retrieveByPK( $caseStep->getStepUidObj() );
|
||||
|
||||
@@ -1923,7 +1923,7 @@ class Cases
|
||||
*
|
||||
* @access public
|
||||
* @param string $app_uid , Uid for case
|
||||
* @param bool|string $del_index , Index for case
|
||||
* @param int $del_index , Index for case
|
||||
* @param string $obj_type , Index for case
|
||||
* @param string $obj_uid , Index for case
|
||||
*
|
||||
@@ -1943,4 +1943,31 @@ class Cases
|
||||
$aField["APP_DATA"] = $oCase->executeTriggers($tas_uid, $obj_type, $obj_uid, "AFTER", $aField["APP_DATA"]);
|
||||
$aField = $oCase->updateCase($app_uid, $aField);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Steps evaluate
|
||||
*
|
||||
* @access public
|
||||
* @param string $app_uid, Uid for case
|
||||
* @param int $del_index , Index for case
|
||||
* @return array
|
||||
*
|
||||
* @copyright Colosa - Bolivia
|
||||
*/
|
||||
public function getSteps($app_uid, $del_index)
|
||||
{
|
||||
Validator::isString($app_uid, '$app_uid');
|
||||
Validator::appUid($app_uid, '$app_uid');
|
||||
Validator::isInteger($del_index, '$del_index');
|
||||
|
||||
$oCase = new \Cases();
|
||||
$aCaseField = $oCase->loadCase($app_uid, $del_index);
|
||||
$tas_uid = $aCaseField["TAS_UID"];
|
||||
$pro_uid = $aCaseField["PRO_UID"];
|
||||
|
||||
$oApplication = new \Applications();
|
||||
$aField = $oApplication->getSteps($app_uid, $del_index, $tas_uid, $pro_uid);
|
||||
|
||||
return $aField;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1000,7 +1000,7 @@ class Cases extends Api
|
||||
* Execute triggers
|
||||
*
|
||||
* @param string $app_uid {@min 1}{@max 32}
|
||||
* @param string $del_index {@from body}
|
||||
* @param int $del_index {@from body}
|
||||
* @param string $obj_type {@from body}
|
||||
* @param string $obj_uid {@from body}
|
||||
*
|
||||
@@ -1017,5 +1017,26 @@ class Cases extends Api
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url GET /:app_uid/:del_index/steps
|
||||
*
|
||||
* @param string $app_uid {@min 32}{@max 32}
|
||||
* @param int $del_index
|
||||
*
|
||||
*/
|
||||
public function doGetSteps($app_uid, $del_index)
|
||||
{
|
||||
try {
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$case->setFormatFieldNameInUppercase(false);
|
||||
|
||||
$response = $case->getSteps($app_uid, $del_index);
|
||||
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user