Adding optional taskid parameter to newCaseImpersonate function

This commit is contained in:
ralph
2013-03-19 10:45:04 -04:00
parent 278e9bbc9b
commit f5d94ebbf9
2 changed files with 37 additions and 8 deletions

View File

@@ -2002,15 +2002,16 @@ function PMFDerivateCase ($caseId, $delIndex, $bExecuteTriggersBeforeAssignment
* @param string(32) | $processId | Process ID | The unique ID of the process.
* @param string(32) | $userId | User ID | The unique ID of the user.
* @param array | $variables | Array of variables | An associative array of the variables which will be sent to the case.
* @param string(32) | $taskId | The unique ID of the task taha is in the starting group.
* @return int | $result | Result | Returns 1 if new case was created successfully; otherwise, returns 0 if an error occurred.
*
*/
function PMFNewCaseImpersonate ($processId, $userId, $variables)
function PMFNewCaseImpersonate ($processId, $userId, $variables, $taskId = '0')
{
G::LoadClass( "wsBase" );
$ws = new wsBase();
$result = $ws->newCaseImpersonate( $processId, $userId, $variables );
$result = $ws->newCaseImpersonate( $processId, $userId, $variables, $taskId);
if ($result->status_code == 0) {
return $result->caseId;