Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Vysakh
#825845
Hi

Is it possible to communicate between two ProcessMaker instances using web-service ? If it is possible could you describe how it is possible ?
We are using Processmaker version 3.2.1 -community
Database MySql Version 5.6.10
Webserver Apache/2.4.18
PHP Version 5.6.40
Operating System Linux
#825859
Yes, you can call the web services of one instance of ProcessMaker from another.
For example, let's say that you have ProcessMaker installed at http://192.168.0.1 and another at http://192.168.0.2.
Then, in a trigger or plugin in http://192.168.0.1, you can use this PHP code:
Code: Select all
$client = new SoapClient('http://192.168.0.2/sysworkflow/en/neoclassic/services/wsdl2');
$params = array(array('userid'=>'johndoe', 'password'=>'foobar'));
$result = $client->__SoapCall('login', $params);

if ($result->status_code == 0)
   $sessionId = $result->message;
else {
   throw new Exception("Unable to connect to ProcessMaker.\nError Number: $result->status_code\n" .
         "Error Message: $result->message\n");
}

$params = array(array('sessionId'=>$sessionId));
$result = $client->__SoapCall('caseList', $params);

@=casesGrid = array();
$counter = 1;
$aCases = $result->cases;

if ($aCases != (object) NULL) {
   foreach ($aCases as $aCase) {
      @=casesGrid[ $counter ] = array(
           'caseTitle' => $aCase->name, 
           'caseId' => $aCase->guid, 
           'caseStatus' => $aCase->status
      );
      $counter++;
   }
}

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]