Show contents 

Web Service > Web Service Operations > Working with Processes > GetSubprocessInstancesList

GetSubprocessInstancesList

Syntax

GetProcessInstancesResult GetSubprocessInstancesList(BpmProcessId tBpmProcess, BProcessInstancesArg arg)

Parameters

tBpmProcess. Moniker of opened process.

tArg. Operation execution parameters.

Description

The GetSubprocessInstancesList operation gets a list of subprocesses that are started and running within the process instance.

Comments

To execute the operation, in the tBpmProcess field specify moniker of opened process. The moniker can be obtained after executing the OpenBpmProcess operation. In the arg.parentInstKey field specify key of the running process instance.

The operation results in the obtained collection of running subprocesses.

Example

Below is the example of getting a list of subprocesses started within the running process instance. The request contains moniker of opened process and key of the running process instance. The response contains the obtained list of subprocesses.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetSubprocessInstancesList xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>EOHGCHDLPGODGOAEHHPEEEGHEJFOAJNEOIBOJAACCPCDMAJE!M!S!BPDIKMKKDLPGODGOAENFLJMPAFGPLAPIFEBLLDBFPBHIDJCEMA</id>
  </tBpmProcess>
<arg xmlns="">
  <mode>0</mode>
  <parentInstKey>106740</parentInstKey>
  </arg>
  </GetSubprocessInstancesList>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetSubprocessInstancesListResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <operations xmlns="">1</operations>
<list xmlns="">
<it>
  <key>106752</key>
  <startDate>20.09.2024 06:46:37</startDate>
  <comment />
  <prms>Branches = 'Perm branch'</prms>
  <name>slave</name>
  <mbKey>168054</mbKey>
  </it>
<it>
  <key>106751</key>
  <startDate>20.09.2024 06:46:37</startDate>
  <comment />
  <prms>Branches = 'Moscow branch'</prms>
  <name>slave</name>
  <mbKey>168054</mbKey>
  </it>
  </list>
  </GetSubprocessInstancesListResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetSubprocessInstancesList" :
{
"tBpmProcess" :
{
"id" : "EOHGCHDLPGODGOAEHHPEEEGHEJFOAJNEOIBOJAACCPCDMAJE!M!S!BPDIKMKKDLPGODGOAENFLJMPAFGPLAPIFEBLLDBFPBHIDJCEMA"
},
"arg" :
{
"mode" : "0",
"parentInstKey" : "106740"
}
}
}

JSON response:

{
"GetSubprocessInstancesListResult" :
{
"operations" : "1",
"list" :
{
"it" :
[
{
"key" : "106752",
"startDate" : "20.09.2024 06:46:37",
"comment" : "",
"prms" : "Branches = 'Perm branch'",
"name" : "slave",
"mbKey" : "168054"
},
{
"key" : "106751",
"startDate" : "20.09.2024 06:46:37",
"comment" : "",
"prms" : "Branches = 'Moscow branch",
"name" : "slave",
"mbKey" : "168054"
}
]
}
}
}
public static GetProcessInstancesResult GetSubprocessInstancesList(string moniker, int processInstanceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetSubprocessInstancesList()
{
tBpmProcess = new BpmProcessId() { id = moniker },
arg = new BProcessInstancesArg() { mode = 0, parentInstKey = processInstanceKey}
};
// Get list of subprocesses executed within process instance
var result = somClient.GetSubprocessInstancesList(tGet);
return result;
}

See also:

Working with Processes