New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Absent Member.
Absent Member.

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="" xmlns:xsd="" xmlns:soapenv="" xmlns:wsc="" xmlns:soapenc="">
  <wsc:runFlow soapenv:encodingStyle="">
   <params xsi:type="soap:WSRunParameters" xmlns: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?




2 Replies
Micro Focus Expert
Micro Focus Expert


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
New version of Mahmoudthoughts witten by other IT experts, if you want to share tips and tricks you are invited to join and write your own articles.
  • Say thanks by clicking the "Thump Up!" 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.
    Absent Member.
    Absent Member.

    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.


    The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.