GetProcessInstances

Syntax

GetProcessInstancesResult GetProcessInstances(BpmProcessId tBpmProcess, BProcessInstancesArg arg)

Parameters

tBpmProcess. Moniker of opened process.

arg. Operation execution parameters.

Description

The GetProcessInstances operation gets a list of executed process instances.

Comments

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.

Example

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.

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">
<GetProcessInstances xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>MGJFJPPOBBDDGOAECMABJPKINDGPEBIEBLJDEKDGIANBKOGK!M!S!BPIMOEODAPBBDDGOAEDHLCADLCMDDIJDCEGJPKIJEBEEOLAHIL</id>
  </tBpmProcess>
<arg xmlns="">
  <mode>Default</mode>
  </arg>
  </GetProcessInstances>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetProcessInstancesResult 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>98037</key>
  <startDate>21.06.2024 08:27:14</startDate>
  <comment />
  <prms>Branches = 'Large branches'</prms>
  </it>
  </list>
  </GetProcessInstancesResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetProcessInstances" :
{
"tBpmProcess" :
{
"id" : "MGJFJPPOBBDDGOAECMABJPKINDGPEBIEBLJDEKDGIANBKOGK!M!S!BPIMOEODAPBBDDGOAEDHLCADLCMDDIJDCEGJPKIJEBEEOLAHIL"
},
"arg" :
{
"mode" : "Default"
}
}
}

JSON response:

{
"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:

Working with Processes