GetProcessInstances

Syntax

GetProcessInstancesResult GetProcessInstances(BpmProcessId tBpmProcess, BProcessInstancesArg arg)

Parameters

tBpmProcess. Moniker of opened process instance.

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 instance. The moniker can be obtained after executing the OpenBpmProcess operation. If it is required to get a list of processes executed within a subprocess, specify identifier of the subprocess instance 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 instance. 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>CDIKMKCKEHJCGOAELMMPKEGKAJIPBMFELKNPPPKHHFAHIIHI!M!S!BPFGPGKNCKEHJCGOAEHJDEHIPJFHBPODGEKJCMFANHBFPHKIDC</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>51021</key>
  <startDate>31.03.2024 17:14:38</startDate>
  <comment />
  <prms>Dictionary = '1'</prms>
  </it>
  </list>
  </GetProcessInstancesResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetProcessInstances" :
{
"tBpmProcess" :
{
"id" : "CDIKMKCKEHJCGOAELMMPKEGKAJIPBMFELKNPPPKHHFAHIIHI!M!S!BPFGPGKNCKEHJCGOAEHJDEHIPJFHBPODGEKJCMFANHBFPHKIDC"
},
"arg" :
{
"mode" : "Default"
}
}
}

JSON response:

{
"GetProcessInstancesResult" :
{
"operations" : "1",
"list" :
{
"it" :
{
"key" : "51021",
"startDate" : "31.03.2024 17:14:38",
"comment" : "",
"prms" : "Dictionary = '1'"
}
}
}
}
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