Show TOC

URIs for Accessing BPM TasksLocate this document in the navigation structure

This topic lists the available uniform resource identifiers (URI) you can use to access BPM tasks or perform an operation on a task.

Available URIs
Action URI Description
Get service metadata GET /bpmodata/tasks.svc/$metadata

The response body provides the metadata document of the service tasks.svc.

Claim a task

POST /bpmodata/tasks.svc/Claim?InstanceID='<task-instance-id>'

*

The response body provides the claimed task.

Release a task

POST /bpmodata/tasks.svc/Release?InstanceID='<task-instance-id>'

The response body provides the released task.

Forward a task

POST /bpmodata/tasks.svc/Forward?InstanceID='<task-instance-id>'&ForwardTo='<unique-username>'

The response body provides the forwarded task.

Get filtered tasks

GET /bpmodata/tasks.svc/TaskCollection?$filter=<filter-expression>

GET /bpmodata/tasks.svc/TaskCollection?$filter=<filter-expression>&$orderby=<property1>, <property2>

GET /bpmodata/tasks.svc/TaskCollection?$filter=<filter-expression>&$top=<N>

GET /bpmodata/tasks.svc/TaskCollection?$filter=<filter-expression>&$skip=<N>

GET /bpmodata/tasks.svc/TaskCollection?$filter=<filter-expression>&$inlinecount=allpages

GET /bpmodata/tasks.svc/TaskCollection?$filter=<filter-expression>&$skip=<Ns>&$top=<Nt>&$inlinecount=allpages

The response body provides a collection of tasks matching the given filter.

Note: Requests without the $filter option are not allowed.

Note: $inlinecount ignores any $top and $skip query options, and returns the total count of tasks.

Note: The response body also contains the number of tasks if the allpages value for the $inlinecount query option is specified.

Get a specific task

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')?$expand=<navigation-property-name>

The response body provides the requested task.

Get UI execution link of a task

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')/UIExecutionLink

The response body provides the UIExecution entity, which corresponds to the task with <task-instance-id>.

Get definition of a task

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')/TaskDefinitionData

The response body provides the TaskDefinition entity, which corresponds to the task with <task-instance-id>.

Get custom attributes of a task

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')/CustomAttributeData

The response body provides the CustomAttribute entity, which corresponds to the task with <task-instance-id>.

Get description of a task

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')/Description

The response body provides the TaskDescription entity, which corresponds to the task with <task-instance-id>.

Get comments of a task

GET /bpmodata/tasks.svc/TaskCollection('<task-instance-id>')/Comments

The response body provides the Comment entity, which corresponds to the task with <task-instance-id>.

Get number of tasks

GET /bpmodata/tasks.svc/TaskCollection/$count?$filter=<filter-expression>

The response body provides the number of tasks.

Note: Requests without the $filter are not allowed.

Search for users

GET /bpmodata/tasks.svc/SearchUsers?SearchPattern='<pattern>'&MaxResults=<max_results>

GET /bpmodata/tasks.svc/SearchUsers?SearchPattern='<pattern>'

GET /bpmodata/tasks.svc/SearchUsers?MaxResults=<max-results>

GET /bpmodata/tasks.svc/SearchUsers

The response body provides a collection of users matching the search pattern and containing the number of users that is equal to or less than the value of the MaxResults parameter.

Note: Users search is performed by the properties UniqueName, FirstName, LastName, and Email

Note: The SearchPattern parameter can contain the following wildcards: * and ?. '*' represents any number of arbitrary characters and '?' represents one arbitrary character.

Note: The SearchPattern parameter is optional. If it is not specified, the value * will be used by default.

Note: The MaxResults parameter is optional. If it is not specified, the value 1000 will be used by default.

Note: The service response contains users that are not service users and that are assigned the BPEM End User role.

Get custom actions of a task

GET /bpmodata/tasks.svc/DecisionOptions?InstanceID='<task-instance-id>'

The response body contains a collection of custom actions for the task with the specified <task-instance-id>.

Complete a task with a custom action

POST /bpmodata/tasks.svc/Decision?InstanceID='<task-instance-id>'&DecisionKey='<decision-key>'

POST /bpmodata/tasks.svc/Decision?InstanceID='<task-instance-id>'&DecisionKey='<decision-key>'&Comments='<comment_text>'

Completes a task with the specified <task-instance-id> executing the task's custom action with the action name taken from the DecisionKey parameter value. The task is completed with its default output data, which is empty in most cases.

The response body contains the completed task.

Get all task definitions

GET /bpmodata/tasks.svc/TaskDefinitionCollection

GET /bpmodata/tasks.svc/TaskDefinitionCollection?$expand=CustomAttributeDefinitionData

The response body provides a collection of BPM task models. The definition of task custom attributes can be retrieved if necessary.

Get a specific task definition

GET /bpmodata/tasks.svc/TaskDefinitionCollection('<task-definition-id>')

GET /bpmodata/ tasks.svc/TaskDefinitionCollection('<task-definition-id>') ?$ expand=CustomAttributeDefinitionData

The response body provides the task definition for the specified <task-definition-id>.

The definition of task custom attributes can be retrieved if necessary.

Get definition of task custom attributes

GET /bpmodata/tasks.svc/TaskDefinitionCollection('<task-definition-id>')/CustomAttributeDefinitionData

The response body provides the definition of the custom attributes for the specified <task-definition-id>.

Create a substitution rule

POST /bpmodata/tasks.svc/SubstitutionRuleCollection/ (Recommended)

POST /bpmodata/tasks.svc/CreateSubstitutionRule?BeginDate='<begin-date>'&IsEnabled='<enabled>'&Mode='<substitution-mode>'&User='<unique-username>'&EndDate='<end-date>'&Profile='profile'

The response body provides the created substitution rule.

Note: The payload of the POST request on SubstitutionRuleCollection needs to contain all information necessary for creating the substitution rule: at least BeginDate, IsEnabled, Mode, and User (see also the notes below).

Note: The EndDate parameter is optional. If there is no value specified for this parameter, the substitution rule will be active until it is either deleted or disabled by the substituted user.

Note: The IsEnabled parameter indicates whether the created substitution rule is to be enabled. The value that is specified for this parameter can be different from the IsEnabled property of the created SubstitutionRule entity. The reason is that the value of the IsEnabled property of the SubstitutionRule entity type indicates whether the substitution rule is active or not.

Note: Only the following values can be specified for the Mode parameter: RECEIVE_TASKS and TAKE_OVER.

Note: The User parameter specifies the unique name of the substituting user for whom the substitution rule is created

Note: The Profile parameter is optional. If there is no value specified for this parameter, the substitution rule will not be assigned to a specific substitution profile.

Enable/Take over a substitution rule

POST /bpmodata/tasks.svc/EnableSubstitutionRule?SubstitutionRuleID='<substitution-rule-id>'&Enabled=<true | false>

The response body provides the updated substitution rule.

Delete a substitution rule

POST /bpmodata/tasks.svc/DeleteSubstitutionRule?SubstitutionRuleID='<substitution-rule-id>'

The response body is empty.

Get substitution rules for which the current user is the substituting user

GET /bpmodata/tasks.svc/SubstitutesRuleCollection

GET /bpmodata/tasks.svc/SubstitutesRuleCollection?$top=<N>

GET /bpmodata/tasks.svc/SubstitutesRuleCollection?$skip=<N>

GET /bpmodata/tasks.svc/SubstitutesRuleCollection?$inlinecount=allpages

GET /bpmodata/tasks.svc/SubstitutesRuleCollection?$skip=<Ns>&$top=<Nt>&$inlinecount=allpages

GET /bpmodata/tasks.svc/SubstitutesRuleCollection?$filter=<filter-expression>

The response body provides a collection of substitution rules where the current user is the substituting user.

Note: The response body also contains the number of rules if the allpages value for the $inlinecount query option is specified.

Note: $inlinecount ignores any $top and $skip query options, and returns the total number of rules.

Note: Filtering is supported only for the IsEnabled property. Only the operators eq and ne are supported for filtering by the IsEnabled property. The filter expression can contain only one expression for the IsEnabled property.

Get a specific substitution rule for which the current user is the substituting user

GET /bpmodata/tasks.svc/SubstitutesRuleCollection('<substitution-rule-id>')

The response body provides the requested substitution rule for which the current user is the substituting user.

Get the number of substitution rules for which the current user is the substituting user

GET /bpmodata/tasks.svc/SubstitutesRuleCollection/$count

GET /bpmodata/tasks.svc/SubstitutesRuleCollection/$count?$skip=<Ns>&$top=<Nt>

GET /bpmodata/tasks.svc/SubstitutesRuleCollection/$count?$filter=<filter-expression>

The response body contains the number of rules for which the current user is the substituting user. $top, $skip, and $filter query options will be considered if they are specified.

Get substitution rules for which the current user is the substituted user

GET /bpmodata/tasks.svc/SubstitutionRuleCollection

GET /bpmodata/tasks.svc/SubstitutionRuleCollection?$top=<N>

GET /bpmodata/tasks.svc/SubstitutionRuleCollection?$skip=<N>

GET /bpmodata/tasks.svc/SubstitutionRuleCollection?$inlinecount=allpages

GET /bpmodata/tasks.svc/SubstitutionRuleCollection?$skip=<Ns>&$top=<Nt>&$inlinecount=allpages

GET /bpmodata/tasks.svc/SubstitutionRuleCollection?$filter=<filter-expression>

The response body provides a collection of substitution rules for which the current user is the substituted user.

Note: The response body also provides the number of rules if the allpages value for the $inlinecount query option is specified.

Note: $inlinecount ignores any $top and $skip query options, and returns the total number of rules.

Note: Filtering is supported only for the IsEnabled property. Only the operators eq and ne are supported for filtering by the IsEnabled property. The filter expression can contain only one expression for the IsEnabled property.

Get a specific substitution rule for which the current user is the substituted user

GET /bpmodata/tasks.svc/SubstitutionRuleCollection('<substitution-rule-id>')

The response body provides the requested substitution rule for which the current user is the substituted user.

Get the number of substitution rules for which the current user is the substituted user

GET /bpmodata/tasks.svc/SubstitutionRuleCollection/$count

GET /bpmodata/tasks.svc/SubstitutionRuleCollection/$count?$skip=<Ns>&$top=<Nt>

GET /bpmodata/tasks.svc/SubstitutionRuleCollection/$count?$filter=<filter-expression>

The response body provides the number of rules for which the current user is the substituted user. $top, $skip, and $filter query options will be considered if they are specified.

Get substituted users for the current user

GET /bpmodata/tasks.svc/SubstitutedUsersCollection

GET /bpmodata/tasks.svc/SubstitutedUsersCollection?$top=<N>

GET /bpmodata/tasks.svc/SubstitutedUsersCollection?$skip=<N>

GET /bpmodata/tasks.svc/SubstitutedUsersCollection?$inlinecount=allpages

GET /bpmodata/tasks.svc/SubstitutedUsersCollection?$skip=<Ns>&$top=<Nt>&$inlinecount=allpages

The response body provides a collection of the substituted users for the current user.

Note: Only substituted users of active substitution rules are returned.

Note: The user can read information of another user only if the SAP_BPM_ODATA_READ_USER_INFO action is assigned to him.

Note: The response body also provides the number of users if the allpages value for the $inlinecount query option is specified.

Get a specific substituted user

GET /bpmodata/tasks.svc/SubstitutedUsersCollection('<unique-username>')

The response body provides the requested substituted user.

Note: The user can read information of another user only if the SAP_BPM_ODATA_READ_USER_INFO action is assigned to him.

Add a comment to a task

POST /bpmodata/tasks.svc/AddComment?InstanceID='<task-instance-id>'&Text='<comment>'

The response body contains the created comment.

Read user information about a particular user

GET /bpmodata/tasks.svc/UserInfoCollection('<unique-username>')

The response body provides information about the requested user.

Note: The user can read information of another user only if the SAP_BPM_ODATA_READ_USER_INFO action is assigned to him.

* To protect modifying requests such as POST against cross-site request forgery (CSRF) attacks, a valid CSRF token is required. Therefore, you need to request a CSRF token with a GET request containing the header 'X-CSRF-Token' with the value 'Fetch' before using the POST request. Modifying requests without a valid CSRF token are rejected.

Note

You can use only the URIs that are listed in the table. In addition, for GET data requests, the $format option is allowed. No other additional OData parameters are supported.

Only the GET and POST requests mentioned in the table are supported by the BPM Tasks OData service.