ProcessMaker-BE "Process Variable - Endpoint execute-query"
- Se ha implementado el siguiente Endpoint:
POST /api/1.0/{workspace}/project/:prj_uid/process-variable/:var_name/execute-query
This commit is contained in:
@@ -107,4 +107,27 @@ class Variable extends Api
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url POST /:prj_uid/process-variable/:var_name/execute-query
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
* @param string $var_name
|
||||
* @param array $request_data
|
||||
*/
|
||||
public function doPostVariableExecuteSql($prj_uid, $var_name, $request_data)
|
||||
{
|
||||
try {
|
||||
$variable = new \ProcessMaker\BusinessModel\Variable();
|
||||
|
||||
$arrayData = ($request_data != null)? $variable->executeSql($prj_uid, $var_name, $request_data) : $variable->executeSql($prj_uid, $var_name);
|
||||
|
||||
$response = $arrayData;
|
||||
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user