GetProcessInstancesResult GetProcessInstances(BpmProcessId tBpmProcess, BProcessInstancesArg arg)
tBpmProcess. Moniker of opened process.
arg. Operation execution parameters.
The GetProcessInstances operation gets a list of executed process instances.
To execute the operation, in the tBpmProcess field specify moniker of opened process. The moniker can be obtained after executing the OpenBpmProcess operation. If it is required to get a list of subprocesses that are child ones for process instance, specify identifier of the process identifier in the arg.parentInstId field.
The operation results in the obtained list of executed process instances.
Below is the example of getting a list of executed process instances. The request contains moniker of opened process. The response contains the obtained information.
{
"GetProcessInstances" :
{
"tBpmProcess" :
{
"id" : "MGJFJPPOBBDDGOAECMABJPKINDGPEBIEBLJDEKDGIANBKOGK!M!S!BPIMOEODAPBBDDGOAEDHLCADLCMDDIJDCEGJPKIJEBEEOLAHIL"
},
"arg" :
{
"mode" : "Default"
}
}
}
{
"GetProcessInstancesResult" :
{
"operations" : "1",
"list" :
{
"it" :
{
"key" : "98037",
"startDate" : "21.06.2024 08:27:14",
"comment" : "",
"prms" : "Branches = 'Large branches"
}
}
}
}
public static GetProcessInstancesResult GetProcessInstances(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetProcessInstances()
{
tBpmProcess = new BpmProcessId() { id = moniker },
arg = new BProcessInstancesArg() { mode = BProcessInstanceMode.Default }
};
// Get a list of executed instances of the specified process
var result = somClient.GetProcessInstances(tGet);
return result;
}
See also: