GetBpmUserTasks

Syntax

GetBpmUserTasksResult GetBpmUserTasks(BpmProcessId tBpmProcess, GetBpmUserTasksArg arg)

Parameters

tBpmProcess. Moniker of opened process.

arg. Operation execution parameters.

Description

The GetBpmUserTasks operation is used to get a list of steps available for the user.

Comments

It is relevant if work is executed under the user who is not an administrator or process owner. The operation gets the steps available for the user. Steps can be obtained both from all running process instances and from specific instances started with specific parameter values.

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.mode field define a step selection mode. The steps waiting for user execution are selected by default. To filter process steps, in the arg.filters field determine the parameter values, with which the process is started.

The operation results in the obtained list of steps available for the user.

Example

It is assumed that repository connection is established under the user who is not administrator or process owner.

Below is the example of getting a list of steps available for the user in the process instance started with a specific parameter value. The request contains moniker of the opened process and moniker of the parameter selection, by which process instances will be filtered. The response contains the obtained list of steps.

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">
<GetBpmUserTasks xmlns="http://www.fsight.ru/PP.SOM.Som">
<tBpmProcess xmlns="">
  <id>EJPAONFCDNGFGOAEDHEINLNGGNKIPDEEIJIBGLHHBJLIOLEH!M!S!BPJCJGLOFCDNGFGOAEJHPPCPHOBNLEHIOELLOEGJHOBENCCKGL</id>
  </tBpmProcess>
<arg xmlns="">
  <mode>1</mode>
<filters>
<params>
<it>
  <mnk>EJPAONFCDNGFGOAEDHEINLNGGNKIPDEEIJIBGLHHBJLIOLEH!M!S!SNPLAAPFCDNGFGOAEOOLPOKJJEAJBNDMEGKCGKOGPHCBGOGPD</mnk>
  </it>
  </params>
  </filters>
  </arg>
  </GetBpmUserTasks>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetBpmUserTasksResult 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">
<list xmlns="">
<it>
<inst>
  <key>1166</key>
  <startDate>2025-04-03T03:03:43.000Z</startDate>
  <comment />
  <prms>Industries = 'Electric power industry'</prms>
<crtr>
  <sid>PS-1-1</sid>
  <name>ADMIN</name>
  </crtr>
  </inst>
<usrTsks>
<it>
  <name>Manual action</name>
  <type>ManualTask</type>
  <guid>{02EFEFEE-E18C-409C-AE74-81CA3B4839F4}</guid>
  <descr />
  <deadline>2025-04-04T08:03:44.000Z</deadline>
  <autoExec>0</autoExec>
<states>
  <it>2</it>
  </states>
<usr>
  <sid>PS-1-60936</sid>
  <name>IVANOV</name>
  </usr>
  </it>
  </usrTsks>
  </it>
  </list>
  </GetBpmUserTasksResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetBpmUserTasks" :
{
"tBpmProcess" :
{
"id" : "EJPAONFCDNGFGOAEDHEINLNGGNKIPDEEIJIBGLHHBJLIOLEH!M!S!BPJCJGLOFCDNGFGOAEJHPPCPHOBNLEHIOELLOEGJHOBENCCKGL"
},
"arg" :
{
"mode" : "1",
"filters" :
{
"params" :
{
"it" :
{
"mnk" : "EJPAONFCDNGFGOAEDHEINLNGGNKIPDEEIJIBGLHHBJLIOLEH!M!S!SNPLAAPFCDNGFGOAEOOLPOKJJEAJBNDMEGKCGKOGPHCBGOGPD"
}
}
}
}
}
}

JSON response:

{
"GetBpmUserTasksResult" :
{
"list" :
{
"it" :
{
"inst" :
{
"key" : "1166",
"startDate" : "2025-04-03T03:03:43.000Z",
"comment" : "",
"prms" : "Industries = 'Electric power industry'",
"crtr" :
{
"sid" : "PS-1-1",
"name" : "ADMIN"
}
},
"usrTsks" :
{
"it" :
{
"name" : "Manual action",
"type" : "ManualTask",
"guid" : "{02EFEFEE-E18C-409C-AE74-81CA3B4839F4}",
"descr" : "",
"deadline" : "2025-04-04T08:03:44.000Z",
"autoExec" : "0",
"states" :
{
"it" : "2"
},
"usr" :
{
"sid" : "PS-1-60936",
"name" : "IVANOV"
}
}
}
}
}
}
}
public static GetBpmUserTasksResult GetBpmUserTasks(string moniker, string filterParamSelection)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetBpmUserTasks()
{
arg = new GetBpmUserTasksArg()
{
filters = new BpmUserTasksFilters()
{
@params = new BpmDimSelection[]
{
new BpmDimSelection()
{
mnk = filterParamSelection
}
}
},
mode = 1 // All tasks available for the user
},
tBpmProcess = new BpmProcessId() { id = moniker }
};
// Get process instances filtered by parameter value specified on startup
var result = somClient.GetBpmUserTasks(tGet);
return result;
}

See also:

Working with Processes