The Process Federation Server REST APIs
Process Federation Server includes REST APIs that you can use to build custom client applications to support task worker scenarios in federated environments, for example, querying a federated task list, working on the returned tasks, and starting new instances from a federated launch list.
- Process Federation Server REST APIs focus on a subset of APIs that are required for task worker scenarios.
- Process Federation Server REST APIs are for aggregate sets of resources, such as the task list. The APIs query a distributed index on the process federation server, instead of querying each of the federated systems individually as is the case for the federated REST APIs. This query behavior improves performance and offloads expensive queries from the federated systems.
- For working with individual resources, for example, claiming or working on an individual task, client applications work directly against the system that hosts the task. In this way, existing client code that interacts with a single system resource will continue to work as is.
To ease the transition of existing clients from the federated APIs to the Process Federation Server REST APIs, the Process Federation Server REST APIs use the same API signature as the federated REST APIs.
REST APIs
The Process Federation Server REST APIs include the following REST APIs. An example URL is provided for each of the APIs. Many of the URLs represent an HTTP GET request, which means that you can test REST API GET methods directly in your browser and examine the response content.- Launch Entities REST API
- Provides a federated list of the processes, services, and BPEL invocation tasks that can be
started by the current logged-on user. The following figure shows how the REST services for the
launch interact with the components in the federated environment.Attributes are returned for each startable item and depend on the federated system type. The attributes include a system ID that indicates the system that the item runs on. The federationResult section in the response data contains an entry for each system ID that indicates the URLs to use for working with that system.
- Saved Search REST API
- Provides methods for creating, retrieving, updating, and deleting saved searches in federated
environments. The searches are stored in the Process Federation Server database.Note: Although you can run an ad hoc search to retrieve a list of process instances, you cannot save and then retrieve a saved search for process instances.
- V21.0.2 Search Metadata REST API
- Provides metadata related to saved searches. Use the API to determine the filter criteria you
can apply to fields in the task query and whether the fields support full-text search. A parameter
is also available to retrieve this information for business data fields. In addition, you can use
the API to retrieve the allowed values for task status and task priority.By default, the returned metadata applies to a task search, but if you set the parameter searchType to
INSTANCE_SEARCH
you can retrieve instance search metadata instead. The following example returns the list of fields that can be used in an instance saved search:
Example: [GET]https://pfsHost.mycompany.com:9443/rest/bpm/federated/v1/searches/meta/fields?searchType=INSTANCE_SEARCH
- Available fields
- Example: [GET]
Returns name/type pairs for each of the fields in the search. The data type can take one of the following values:https://pfsHost.mycompany.com:9443/rest/bpm/federated/v1/searches/meta/fields
String, Date, Time, Decimal, Boolean
- Filter criteria
- Example: [GET]
Returns the fields that can be used as filters. Each field also includes the data type and a full_text_searchable attribute.https://pfsHost.mycompany.com:9443/rest/bpm/federated/v1/searches/meta/constraintFields
- Business data fields
- Example: [GET]
Returns the business data fields. Each field also includes the data type and a full_text_searchable attribute. For example,https://pfsHost.mycompany.com:9443/rest/bpm/federated/v1/searches/meta/businessDataFields
{ "result":[{ "name":"customer_name", "type":"String", "full_text_searchable":true }, { "name":"phone", "type":"Integer", "full_text_searchable":false } ] }
By design, Process Federation Server returns all business data fields that it detects as included in process instances. It does not detect business data fields that are modeled but not included in any instances yet.
- Status and priority
- Examples: [GET]
Returns the allowed values for the task status.https://pfsHost.mycompany.com:9443/rest/bpm/federated/v1/searches/meta/taskStatus
Returns the allowed values for the task priority.https://pfsHost.mycompany.com:9443/rest/bpm/federated/v1/searches/meta/priority
- Global Team REST API
- Provides a list of teams the calling user can share saved searches with. Note: This API only includes BPD process teams defined by process applications deployed on federated Business Automation Workflow V18.0.0.1 servers and later. This API does not apply to BPD teams defined by process applications deployed on federated business process management servers V8.6.0 and earlier.
- Systems Metadata REST API
- Provides information about the federated systems. Use the API to detect whether a system is available or to retrieve system-specific settings. Attributes are returned for each system and depend on the system type.
- Task List REST API
- Provides the federated task list. The following figure shows how the REST services for the task
list interact with the components in the federated environment.Fields are returned for each task and depend on the federated system type. The fields include a system ID that indicates the system that the task runs on. The federationResult section in the response data contains an entry for each system ID that indicates the URLs to use for working with that system.
- V21.0.2 Process Instance List REST API
- Provides the federated process instance list. Fields are returned for each process instance, and only return BPD process instances, as this API only applies to data from BPD systems. The fields include a system ID that indicates the system that the process instance runs on. The federationResult section in the response data contains an entry for each system ID that indicates the URLs to use for working with that system.
- Saved Search Transfer REST API
- Provides methods for exporting and importing saved searches in federated environments. The exported saved searches are retrieved from federated systems version 8.5.7 or later. The imported searches are stored in the Process Federation Server database. The saved search definitions that are recorded in the Process Federation Server database can be retrieved as a list and exported.
Process Portal is an example of the types of client application that you can build by using the Process Federation Server REST APIs.
V20.0.0.2 REST APIs for the Team Performance Dashboard
As of V20.0.0.2, Process Federation Server introduces a new set of REST APIs that allow BPD Team managers to gather key performance indicators for their teams. These new REST APIs can be leveraged to create a federated Team Performance Dashboard, similar to the non-federated Team Performance Dashboard that is available in Process Portal.
- Team Summaries REST API
- Returns the list of BPD teams managed by the calling user, with the following information for
each BPD team:
- team id
- team name
- team description
- id of the BPD process application that defines the team
- name of the BPD process application that defines the team
- number of open tasks for this team
- number of on track tasks for this team
- number of tasks that are at risk for this team
- number of overdue tasks for this team
- number of tasks completed today for this team
- Team Summary REST API
- This API is similar to the Team Summaries API, except that it returns the information for only one of the BPD teams that are managed by the calling user.
- Team Tasks Turnover Rate REST API
- Returns the number of tasks created and completed hourly or daily, within a customizable time
frame, for a BPD team managed by the calling user. For each data point returned by this API (one per
hour or one per day for the chosen time frame), the following information is returned:
- the number of tasks created for this team
- the number of tasks completed for this team
- Team Member List REST API
- Returns a list of users that are members of a team managed by the calling user, with the
following information for each user:
- name
- full name
- job title
- phone number
- email address
- number of tasks assigned
- number of tasks completed today
- Team Member Summary REST API
- Returns information about all of the user's tasks (including tasks from other teams), along with
the user information:
- number of tasks completed today
- email address
- phone number
- number of tasks that are overdue
- job title
- name
- full name
- number of tasks that are at risk
- number of open tasks
- number of tasks that are on track
- Team Tasks REST API
- Runs an ad hoc saved search on the tasks of a team managed by the calling user.
Response data
Attribute | Description |
---|---|
indexRefreshInterval | Task list queries are based on the Process Federation Server index. The
indexRefreshInterval attribute indicates how often the index is updated, so that
you can understand how fresh the returned data is. For example, if you modify a task and then
immediately query the task list again, you might not see your update. Take this lapse time into
consideration when you develop custom applications that are based on the REST service. Consider
caching updates locally until the data is refreshed. The value, in milliseconds, is based on the
value of the indexRefreshIntervalForClients property in the
|
statusCode | Indicates the status of the federated system. The value of the attribute
depends on whether the system can be queried by the process federation server. Attribute values.
By default, the system status is cached for 300 seconds, so you might not see status
changes immediately. You can change the cache time by updating the ibmPfs_restConfig
cacheRefreshTime property in the server.xml configuration file, for
example: |
taskCompletionUrlPrefix | Indicates the root URL for completing tasks from a federated system, for
example, https://bpmHost.mycompany.com:9443/teamworks . To complete a task from a
specific system, use the taskCompletionUrlPrefix attribute to go directly to
it. The value is based on the value for the ibmPfs_federationSystem
taskCompletionUrlPrefix property in the server.xml configuration
file. If the system uses an HTTP server or reverse proxy server, use the URL of the HTTP server or
reverse proxy server in front of the federated system as the value in the
server.xml file. |
restUrlPrefix | Indicates the root URL for REST requests on a federated system, for example,
https://bpmHost.mycompany.com:9443/rest/bpm/wle . To make REST requests to a system
(for example, to modify a task on this system), use the restUrlPrefix attribute
to go directly to it. The value is based on the value that is configured for the
ibmPfs_federationSystem restUrlPrefix property in the
server.xml configuration file. If the system uses an HTTP server or reverse
proxy server, use the URL of the HTTP server or reverse proxy server in front of the system as the
value in the server.xml file. |
systemType | Indicates the federated system type, for example:
|
displayName | The name that is used for Process Federation Server in user interfaces and messages. |
systemID | Indicates the unique identifier of the federated system, for example, "a85ce736-a156-49cc-a41f-1a8ed9693357". The systemID attribute is included in every federated resource so that you can associate the resource to a system. |
version | Indicates the version of the federated system, for example, "8.5.7.0" |