Web Service > Web Service Operations > Working with Processes > GetSubprocessInstancesList
GetProcessInstancesResult GetSubprocessInstancesList(BpmProcessId tBpmProcess, BProcessInstancesArg arg)
tBpmProcess. Moniker of opened process.
tArg. Operation execution parameters.
The GetSubprocessInstancesList operation gets a list of subprocesses that are started and running within the process instance.
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.
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.
{
"GetSubprocessInstancesList" :
{
"tBpmProcess" :
{
"id" : "EOHGCHDLPGODGOAEHHPEEEGHEJFOAJNEOIBOJAACCPCDMAJE!M!S!BPDIKMKKDLPGODGOAENFLJMPAFGPLAPIFEBLLDBFPBHIDJCEMA"
},
"arg" :
{
"mode" : "0",
"parentInstKey" : "106740"
}
}
}
{
"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: