ProcessMaker-MA "Web Entry (endpoints)"

- Se han implementado los siguientes Endpoints:

    POST /api/1.0/{workspace}/project/{prj_uid}/web-entry
This commit is contained in:
Victor Saisa Lopez
2014-01-24 16:06:50 -04:00
parent 69983961eb
commit cf69485be3
3 changed files with 423 additions and 35 deletions

View File

@@ -31,38 +31,42 @@ class WebEntry extends Api
}
}
///**
// * @url POST /:projectUid/case-tracker/object
// *
// * @param string $projectUid {@min 32}{@max 32}
// * @param array $request_data
// * @param string $cto_type_obj {@from body}{@choice DYNAFORM,INPUT_DOCUMENT,OUTPUT_DOCUMENT}{@required true}
// * @param string $cto_uid_obj {@from body}{@min 32}{@max 32}{@required true}
// * @param string $cto_condition
// * @param int $cto_position {@from body}{@min 1}
// *
// * @status 201
// */
//public function doPostWebEntry(
// $projectUid,
// $request_data,
// $cto_type_obj = "DYNAFORM",
// $cto_uid_obj = "00000000000000000000000000000000",
// $cto_condition = "",
// $cto_position = 1
//) {
// try {
// $caseTrackerObject = new \BusinessModel\WebEntry();
//
// $arrayData = $caseTrackerObject->create($projectUid, $request_data);
//
// $response = $arrayData;
//
// return $response;
// } catch (\Exception $e) {
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
// }
//}
/**
* @url POST /:projectUid/web-entry
*
* @param string $projectUid {@min 32}{@max 32}
* @param array $request_data
* @param string $tas_uid {@from body}{@min 32}{@max 32}{@required true}
* @param string $dyn_uid {@from body}{@min 32}{@max 32}{@required true}
* @param string $method {@from body}{@choice WS,HTML}{@required true}
* @param int $input_document_access {@from body}{@choice 0,1}{@required true}
* @param string $usr_username {@from body}
* @param string $usr_password {@from body}
*
* @status 201
*/
public function doPostWebEntry(
$projectUid,
$request_data,
$tas_uid = "00000000000000000000000000000000",
$dyn_uid = "00000000000000000000000000000000",
$method = "WS",
$input_document_access = 0,
$usr_username = "",
$usr_password = ""
) {
try {
$webEntry = new \BusinessModel\WebEntry();
$arrayData = $webEntry->create($projectUid, $request_data);
$response = $arrayData;
return $response;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* @url DELETE /:projectUid/web-entry/:activityUid/:dynaFormUid