Operations Orchestration Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Call HPOO runFlow webservice with params

Occasional Visitor

Call HPOO runFlow webservice with params



I'm testing a very simple flow called from PHP, but I can't pass parametres to this flow.


The flow that I created sends an e-mail with the subject and body received from params:


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsc="http://wscentralservice.services.dharma.iconclude.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
  <wsc:runFlow soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <params xsi:type="soap:WSRunParameters" xmlns:soap="http://iconclude.com/webservices/rss/v2.0/soap">
    <async xsi:type="xsd:boolean">true</async>
    <flowInputs xsi:type="wsc:ArrayOf_tns1_WSFlowInput"soapenc:arrayType="soap:WSFlowInput[]" xmlns:wsc="">
      <value>HOW ARE YOU?</value>
    <startPaused xsi:type="xsd:boolean">false</startPaused>
    <trackStatus xsi:type="xsd:boolean">false</trackStatus>
    <uuid xsi:type="xsd:string">2d27dedb-56f6-427e-862f-81197ee6a5ag</uuid>


If I run this XML with SoapUI, the result is OK, the e-mail is sended with the subject and body specified.


The probles is when I call this flow from PHP, I don't know how I can pass the parameters!! The flow runs OK, but not receive any param... This is my PHP code:


$this->client = new SoapClient('',     array(    'soap_version'     => SOAP_1_1,
        'login'         => "user",
        'password'         => "pass",
        'trace'         => 1));


$param                                  = new stdClass();
$param->async                           = true;
$param->startPaused                     = false;
$param->trackStatus                     = false;
$param->uuid                            = '2d27dedb-56f6-427e-862f-81197ee6a5ag';
$param->flowInputs                      = new stdClass();
$param->flowInputs->listValues          = new stdClass();
$param->flowInputs->listValues->subject = 'HELLO';
$param->flowInputs->listValues->body    = 'HOW ARE YOU';


$result = $this->client->runFlow($param);



Have somebody this same problem? How can I pass the param "subject" and "body" (in this case) to the WS method?




Honored Contributor [Founder]

Re: Call HPOO runFlow webservice with params

[ Edited ]


I am not professional in PHP but I am just trying to help you here.

You may try soapCall() function it is very direct in passing the parameters


You may try somehting like the below


$client =newSoapClient("");

/*Creating the list of values array */

$listValuesArray = array();
$listValuesArray[] = array("name" => "subject", "value" => "hello");
$listValuesArray[] = array("name" => "body", "value" => "how are you");

/*Adding list of values array to flowinput Array  */

$flowInputsArray = array();
$flowInputsArray[] = array("listValues" => $listValuesArray );
$params = array(
flowInputs => $flowInputsArray
$response = $client->__soapCall("runFlow", array($params));


I hope this will work

Mahmoud Ibrahim
  • Say thanks by clicking the "Kudos! Star" which is on the left.

  • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
  • Occasional Visitor

    Re: Call HPOO runFlow webservice with params

    I know this thread is old, but I had troubles using HPOO runFlow with SOAP and finaly found the solution, so I give it:


    You must use objects and SoapVar to create a good XML:

    class listValues {
        public $name;
        public $value;
    function newParam($name, $value) {
        $flowParam = new listValues();
        $flowParam->name = $name;
        $flowParam->value = $value;
        $flowParam = new SoapVar($flowParam, SOAP_ENC_OBJECT, null, null, 'listValues');
        return $flowParam;
    $flowInputArray= new ArrayObject();
    $flowInputArray->append(newParam('subject', 'Hello'));
    $flowInputArray->append(newParam('body', 'this is my body'));
    $params = array(
       'async' => 'true',
       'startPaused' => 'false',
       'trackStatus' => 'true',
       'uuid' => '2d27dedb-56f6-427e-862f-81197ee6a5ag',
       'flowInputs' => $flowInputsArray
    $client =newSoapClient("");
    $response = $client->__soapCall('runFlow', array(
       new SoapVar($params, SOAP_ENC_OBJECT)

    If you can read french, I did a small explanation on my blog : Utiliser le webservice HPOO runFlow avec SOAP.