Currently the PFS exposes a federated task list of all task instances through REST. GET /rest/bpm/federated/v1/tasks
We need the following enhancement to the REST interface to give us similar functions as the existing federated task list.
1. The ability to retrieve a federated process instance list of all BPM systems in the federation environment.
2. The ability to filter, sort or limit the number of items returned as well as paging by the resource using the following input fields:
systemId, model, containers, versions, search_term, sort, offset, size, optional_parts
YAML definition
/processes:
get:
summary: 'Retrieve a list of process instances across federated BPM runtimes.'
description: 'Gets a list of process instances across federated BPM runtimes.'
operationId: getProcessesList
tags: [Process]
produces: [application/json]
parameters: [{ name: systemId, in: query, description: 'The system id of a specific federated system', required: false, type: string },
{ name: model, in: query, description: 'The name of the process model. Restricts the results to instances of the specified process model.', required: false, type: string },
{ name: containers, in: query, description: 'A comma-separated list of containers acronyms. Restricts the results to instances that belong to the specified process application acronyms.', required: false, type: array, items: { type: string }, collectionFormat: csv },
{ name: versions, in: query, description: 'A comma-separated list of snapshot acronyms. Restricts the results to instances that belong to the specified snapshots.', required: false, type: array, items: { type: string }, collectionFormat: csv },
{ name: states, in: query, description: 'A comma-separated list of states. Restricts the results to instances in the specified states. Valid values are: ''running'', ''finished'', ''terminated'', ''suspended'', ''stopped'', ''did_not_start''.', required: false, type: array, items: { type: string, enum: [running, finished, terminated, suspended, stopped, did_not_start] }, collectionFormat: csv },
{ name: search_term, in: query, description: 'A string that filters the process instances returned by the given term. The search term is compared against the process model name and process instance name and handled as if wildcard characters are at the beginning and end.', required: false, type: string },
{ name: sort, in: query, description: 'A comma-separated list of sort criteria. The order of the items determines the sorting sequence. The list entries must have the following format: property:sort_direction. Valid values are: ''creation_time:asc'', ''creation_time:desc'', ''model:asc'', ''model:desc'', ''state:asc'', ''state:desc'', ''due_date:asc'', ''due_date:desc''.', required: false, type: array, items: { type: string, enum: ['creation_time:asc', 'creation_time:desc', 'model:asc', 'model:desc', 'state:asc', 'state:desc', 'due_date:asc', 'due_date:desc'] }, collectionFormat: csv },
{ name: offset, in: query, description: 'In a list of entries the offset specifies the position of the first process instance to return from the query result set.', required: false, type: string },
{ name: size, in: query, description: 'Maximum number of process instances to return.', required: false, type: integer, minimum: 1 },
{ name: optional_parts, in: query, description: 'A comma-separated list of optional parts to be returned in the response object. Valid values are: ''data'', ''actions''.', required: false, type: array, items: { type: string, enum: [data, actions] }, collectionFormat: csv }]
responses: { '200': { description: 'The request was processed successfully and returned a list of process instance objects that match the specified query parameters.', schema: { $ref: '#/definitions/processes' } },
'400': { description: 'The request contains invalid parameters, or they are missing.', schema: { $ref: '#/definitions/exception' } },
'500': { description: 'Internal server error.', schema: { $ref: '#/definitions/exception' } } }
This resource should return the following structure for processes:
{
"federationResult" : [],
"processes": [
{
"id": "string",
"model": "string",
"container": "string",
"container_name": "string",
"version": "string",
"version_name": "string",
"state": {},
"creation_time": "2018-03-13T05:43:19.894Z",
"due_date": "2018-03-13T05:43:19.894Z",
"input": [
{
"name": "string",
"data": {}
}
],
"output": {
"name": "string",
"data": {}
},
"internal": {
"name": "string",
"data": {}
},
"modification_time": "2018-03-13T05:43:19.894Z",
"name": "string",
"branch_name": "string",
"actions": [
{}
]
}
],
"previous": "string",
"next": "string"
}
As part of this RFE we would like to incorporate the federated process instance list into the responsive portal so that the portal will have the ability to display a federated process instance list of all federated systems with the ability to sort, and filter the federated process instance list.