Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
#788666
I am trying to use WSDL reassigncase() to reassign a current task from one user to another. Both users have the PM_REASSIGN permission. Both users are included in the "Users & User Groups" and "Users & User Groups (ad hoc)" lists for the task. The WSDL session is logged in as the default ProcessMaker admin user. The task I am trying to reassign is open and is currently assigned to my first user. The user I am reassigning the task to is the Processmaker admin user (UID 00000000000000000000000000000001). When I reassign the case I get response 35, message "The target user destination is invalid". What does this error message mean?
#788668
admin user is in both the "Users & Groups" and the "Users & Groups (ad hoc)" list for this task. Code is below (admin password obfuscated). The SOAP login works fine and returns a session ID for the admin user. The retrieval of user, case ID and delegation index from the URL querystring works fine and returns the correct values (the URL is a clickable link in a templated email sent to the assigned user, using case variables to set the querystring values in the URL). The task being reassigned is showing as status OPEN in the MySQL database, and the assigned user matches the user ID retrieved from the URL querystring. When this code runs, it returns response 35 with message "The target user destination is invalid". I don't know what that message means - if I did, I might have a better chance of debugging this.
Code: Select all
<?php

ini_set("soap.wsdl_cache_enabled", "0");

// SOAP login as admin to get session ID for further SOAP calls

$client = new SoapClient('http://workflowsvr/sysworkflow/en/neoclassic/services/wsdl2');
$pass = 'md5:' . md5('<obfuscated>');
$params = array(array('userid'=>'admin', 'password'=>$pass));
$result = $client->__SoapCall('login', $params);

  
if ($result->status_code == 0) 
   $sessionId = $result->message;
else 
   die("<html><body>Could not log in: " . $result->message . "</body></html>");

// Get case ID, Delegation index, user from URL querystring

   if ($_GET['case']) 
     $case = $_GET['case']; 
   else
     $case = "";

   if ($_GET['index']) 
     $index = $_GET['index']; 
   else
     $index = "";

   if ($_GET['currentuser']) 
     $currentuser = $_GET['currentuser']; 
   else
     $currentuser = "";

  // reassign the task from current user to admin user 

    $params = array(array('sessionId'=>$sessionId, 
      'caseId'=>$case, 'delIndex'=>$index, 'userIdSource'=>$currentuser,'userIdTarget'=>'000000000000000000000000000000001'));
    $result = $client->__SoapCall('reassignCase', $params);
    if ($result->status_code != 0)
      die("<html><body><pre> Reassign Error: $result->message </pre></body></html>");
    else
      die("<html><body><pre> Reassigned to admin - please check</pre></body></html>");

 >

To convert MBOX to PST, start by downloading and i[…]

My Assignment Services stands out as one of the be[…]

Erectile Dysfunction, commonly known as impotence,[…]

Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]