@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen") public class UserTaskInstancesApi extends AbstractRestService
apiClient
Constructor and Description |
---|
UserTaskInstancesApi(ApiClient apiClient)
Instantiates this API class to invoke operations on the Workflow API for Cloud Foundry based on a given
ApiClient . |
UserTaskInstancesApi(HttpDestinationProperties httpDestination)
Instantiates this API class to invoke operations on the Workflow API for Cloud Foundry.
|
Modifier and Type | Method and Description |
---|---|
FormMetadata |
getFormMetadata(String taskInstanceId)
Retrieve form metadata of the given task instance.
|
FormModel |
getFormModel(String taskInstanceId)
Retrieve form model of the given task instance.
|
TaskInstance |
getInstance(String taskInstanceId)
Retrieve task by ID
|
TaskInstance |
getInstance(String taskInstanceId,
String acceptLanguage,
String $expand)
Retrieve task by ID
|
AttachmentsContext |
getInstanceAttachments(String taskInstanceId)
Retrieve task instance attachments
|
List<CustomAttribute> |
getInstanceAttributes(String taskInstanceId)
Retrieve custom task attributes by task instance ID
|
List<CustomAttribute> |
getInstanceAttributes(String taskInstanceId,
String acceptLanguage)
Retrieve custom task attributes by task instance ID
|
Object |
getInstanceContext(String taskInstanceId)
Retrieve task context by ID
|
List<TaskInstance> |
queryInstances()
Retrieve instances by query parameters
|
List<TaskInstance> |
queryInstances(String acceptLanguage,
Integer $skip,
Integer $top,
String $inlinecount,
String $expand,
String $orderby,
String workflowInstanceId,
String workflowDefinitionId,
String processor,
String id,
String activityId,
String description,
String subject,
String createdAt,
String createdFrom,
String createdUpTo,
String claimedAt,
String claimedFrom,
String claimedUpTo,
String completedAt,
String completedFrom,
String completedUpTo,
String lastChangedAt,
String lastChangedFrom,
String lastChangedUpTo,
String dueDate,
String dueDateFrom,
String dueDateUpTo,
String priority,
String status,
String recipientUsers,
String recipientGroups,
String containsText,
String attributesExampleCustomAttribute,
String definitionId)
Retrieve instances by query parameters
|
RestResponse |
updateInstance(String taskInstanceId,
UpdateTaskInstancePayload body)
Update task by ID
|
public UserTaskInstancesApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nullable public FormMetadata getFormMetadata(@Nonnull String taskInstanceId) throws RestRequestException
Retrieve form metadata of the given task instance.
Retrieves the form metadata of the given task instance. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_FORM
200 - Returns the requested form metadata of the given task instance
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether you refer to an existing task instance and whether a task form is assigned.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task instance for which the form metadata should be retrieved. The ID is 36
characters long.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public FormModel getFormModel(@Nonnull String taskInstanceId) throws RestRequestException
Retrieve form model of the given task instance.
Retrieves the form model of the given task instance. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_FORM_MODEL
200 - The deployed form definition model.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether you refer to an existing task instance and whether a task form is assigned.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters
long.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public TaskInstance getInstance(@Nonnull String taskInstanceId, @Nullable String acceptLanguage, @Nullable String $expand) throws RestRequestException
Retrieve task by ID
Retrieves the user task instance with the specified task instance ID. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET
200 - Returns the requested user task.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- (Required) The ID of the user task instance which should be retrieved. The ID is 36 characters long.acceptLanguage
- (Optional) Provide a preferred language. If a translation is available, relevant texts are returned in
this language.$expand
- (Optional) You can request custom task attributes to become part of the task output by specifying the
value 'attributes' for the '$expand' parameter. Otherwise, if the '$expand'
parameter is not specified, the 'attributes' field is not included into task output. Note that
labels as well as the order of the custom task attributes in which they are returned, are taken from
the latest versions of the workflow definitions where these attributes are present.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public TaskInstance getInstance(@Nonnull String taskInstanceId) throws RestRequestException
Retrieve task by ID
Retrieves the user task instance with the specified task instance ID. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET
200 - Returns the requested user task.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task instance which should be retrieved. The ID is 36 characters long.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public AttachmentsContext getInstanceAttachments(@Nonnull String taskInstanceId) throws RestRequestException
Retrieve task instance attachments
Retrieves the attachments information of a workflow instance via the given user task. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_ATTACHMENTS
200 - The attachments information of the workflow instance.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task via which the attachments information of the corresponding workflow instance
should be retrieved. The ID is 36 characters long.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<CustomAttribute> getInstanceAttributes(@Nonnull String taskInstanceId, @Nullable String acceptLanguage) throws RestRequestException
Retrieve custom task attributes by task instance ID
Retrieves custom task attributes of a user task. Labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_ATTRIBUTES
200 - Returns the custom task attributes for the requested user task.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- (Required) The ID of the user task instance for which the custom task attributes should be retrieved.
The ID is 36 characters long.acceptLanguage
- (Optional) Provide a preferred language. If a translation is available, relevant texts are returned in
this language.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<CustomAttribute> getInstanceAttributes(@Nonnull String taskInstanceId) throws RestRequestException
Retrieve custom task attributes by task instance ID
Retrieves custom task attributes of a user task. Labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_ATTRIBUTES
200 - Returns the custom task attributes for the requested user task.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task instance for which the custom task attributes should be retrieved. The ID is
36 characters long.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public Object getInstanceContext(@Nonnull String taskInstanceId) throws RestRequestException
Retrieve task context by ID
**Warning: Users with the role \"WorkflowAdmin\" are no longer able to view the task context. To allow these users to continue to view the context, assign the role \"WorkflowContextViewer\" to them.** Retrieves the context of a user task. Roles permitted to execute this operation: - Global roles: WorkflowContextViewer, WorkflowContextAdmin - Instance-specific roles: contextViewerUsers, contextViewerGroups, contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_CONTEXT
200 - Returns the context of the specified user task.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task for which the context should be retrieved. The ID is 36 characters long.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<TaskInstance> queryInstances(@Nullable String acceptLanguage, @Nullable Integer $skip, @Nullable Integer $top, @Nullable String $inlinecount, @Nullable String $expand, @Nullable String $orderby, @Nullable String workflowInstanceId, @Nullable String workflowDefinitionId, @Nullable String processor, @Nullable String id, @Nullable String activityId, @Nullable String description, @Nullable String subject, @Nullable String createdAt, @Nullable String createdFrom, @Nullable String createdUpTo, @Nullable String claimedAt, @Nullable String claimedFrom, @Nullable String claimedUpTo, @Nullable String completedAt, @Nullable String completedFrom, @Nullable String completedUpTo, @Nullable String lastChangedAt, @Nullable String lastChangedFrom, @Nullable String lastChangedUpTo, @Nullable String dueDate, @Nullable String dueDateFrom, @Nullable String dueDateUpTo, @Nullable String priority, @Nullable String status, @Nullable String recipientUsers, @Nullable String recipientGroups, @Nullable String containsText, @Nullable String attributesExampleCustomAttribute, @Nullable String definitionId) throws RestRequestException
Retrieve instances by query parameters
Retrieves user task instances by parameters. If no parameters are specified, all instances with status READY, RESERVED, CANCELED, or COMPLETED are returned. Parameters for different attributes of the instance are evaluated using the logical 'and' operator. If a parameter is specified multiple times, results are matched using the logical 'or' operator, unless noted otherwise. Empty parameters are treated as if they were not specified. By default, returned tasks are sorted by creation time in ascending order. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET
200 - Returns a list of user task instances.
400 - Incorrect format or structure of the provided request body.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
acceptLanguage
- (Optional) Provide a preferred language. If a translation is available, relevant texts are returned in
this language.$skip
- (Optional, default to 0) The number of records you want to skip from the beginning. You can skip at
most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip
with the $top parameter. If not specified, no records are skipped. You can use this parameter only
once. Refer also to the $top parameter.$top
- (Optional, default to 100) The number of records you want to show. You can get at most 1000 records
per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the
$skip parameter. If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.$inlinecount
- (Optional, default to none) Specify whether the total count of the task instances, which match the
search criteria, should be returned as a value of the X-Total-Count response header. To enable the
header, use the 'allpages' setting. To disable the header, use the 'none' setting. The
values are case-sensitive. You can use this parameter only once.$expand
- (Optional) You can request custom task attributes to become part of the task output by specifying the
value 'attributes' for the '$expand' parameter. Otherwise, if the '$expand'
parameter is not specified, the 'attributes' field is not included into task output. Note that
labels as well as the order of the custom task attributes in which they are returned, are taken from
the latest versions of the workflow definitions where these attributes are present.$orderby
- (Optional, default to createdAt asc) The attribute and direction by which tasks are sorted. The sort
attribute and direction are separated by a space. The parameter value is case-sensitive. You can only
specify one ordering parameter, which contains attribute and direction. To stabilize the order of
tasks the implicit second ordering parameter 'createdAt asc' is applied. * claimedAt asc -
Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet
claimed) first. * claimedAt desc - Descending, from the most recently claimed tasks to the oldest
ones, tasks with status READY (not yet claimed) last. * completedAt asc - Ascending, task completion
or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first. * completedAt
desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet
COMPLETED tasks last. * createdAt asc - Ascending, task creation time from the oldest to the most
recent. * createdAt desc - Descending, from the most recently created tasks to the oldest ones. *
lastChangedAt asc - Ascending, task last change time from the oldest to the most recent. *
lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones. * dueDate
asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due
date first. * dueDate desc - Descending, tasks due date from the most distant in future to the oldest
ones, tasks without due date last. * subject asc - Ascending, from A to Z case-sensitive. * subject
desc - Descending, from Z to A case-sensitive. * description asc - Ascending, from A to Z
case-sensitive, tasks without description first. * description desc - Descending, from Z to A
case-sensitive, tasks without description last. * activityId asc - Ascending, from A to Z
case-sensitive. * activityId desc - Descending, from Z to A case-sensitive. * id asc - Ascending, from
A to Z case-sensitive. * id desc - Descending, from Z to A case-sensitive. * processor asc -
Ascending, from A to Z case-sensitive, tasks without processor first. * processor desc - Descending,
from Z to A case-sensitive, tasks without processor last. * workflowDefinitionId asc - Ascending, from
A to Z case-sensitive. * workflowDefinitionId desc - Descending, from Z to A case-sensitive. *
workflowInstanceId asc - Ascending, from A to Z case-sensitive. * workflowInstanceId desc -
Descending, from Z to A case-sensitive. * priority asc - Ascending, tasks priority from lowest to
highest. * priority desc - Descending, tasks priority from highest to lowest.workflowInstanceId
- (Optional) The workflow instance ID for which the user task instances are returned. The workflow
instance ID is 36 characters long.workflowDefinitionId
- (Optional) The workflow definition ID for which the user task instances are returned.processor
- (Optional) The processor of the user task instance.id
- (Optional) The unique ID of the user task instance. The user task instance ID is 36 characters long.activityId
- (Optional) The activityId of the user task instance. This field represents the ID of the user task
definition.description
- (Optional) The description of the user task instance in UTF-8 encoding. You must not specify texts
that contain commas with this parameter.subject
- (Optional) The subject of the user task instance in UTF-8 encoding. You must not specify texts that
contain commas with this parameter.createdAt
- (Optional) Time when the user task instance has been created. Evaluated using the logical 'or'
operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are
specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2.
yyyyMMddHHmmss.SSScreatedFrom
- (Optional) The start time (inclusive) of the time range when the user task instance was created. Must
be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter
if the latter is specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSScreatedUpTo
- (Optional) The end time (inclusive) of the time range when the user task instance was created. Must be
greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter
if the latter is specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSSclaimedAt
- (Optional) Time when the user task instance was claimed. Evaluated using the logical 'or'
operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are
specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2.
yyyyMMddHHmmss.SSSclaimedFrom
- (Optional) The start time (inclusive) of the time range when the user task instance was claimed. Must
be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter
if the latter is specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSSclaimedUpTo
- (Optional) The end time (inclusive) of the time range when the user task instance was claimed. Must be
greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter
if the latter is specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSScompletedAt
- (Optional) Time when the user task instance was COMPLETED or CANCELED. Evaluated using the logical
'or' operator with the values of the 'completedFrom' and 'completedUpTo'
parameters if they are specified. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2. yyyyMMddHHmmss.SSScompletedFrom
- (Optional) The start time (inclusive) of the time range when the user task instance was COMPLETED or
CANCELED. Must be less or equal to the value of the 'completedUpTo' parameter if the latter is
specified. Evaluated using the logical 'or' operator with the value of the
'completedAt' parameter if the latter is specified. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2. yyyyMMddHHmmss.SSScompletedUpTo
- (Optional) The end time (inclusive) of the time range when the user task instance was COMPLETED or
CANCELED. Must be greater or equal to the value of the 'completedFrom' parameter if the latter
is specified. Evaluated using the logical 'or' operator with the value of the
'completedAt' parameter if the latter is specified. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2. yyyyMMddHHmmss.SSSlastChangedAt
- (Optional) Time when the user task instance has been changed for the last time. Evaluated using the
logical 'or' operator with the values of the 'lastChangedFrom' and
'lastChangedTo' parameters if they are specified. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2. yyyyMMddHHmmss.SSSlastChangedFrom
- (Optional) The start time (inclusive) of the time range when the user task instance was changed for
the last time. Must be less or equal to the value of the 'lastChangedUpTo' parameter if the
latter is specified. Evaluated using the logical 'or' operator with the value of the
'lastChangedAt' parameter if the latter is specified. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2. yyyyMMddHHmmss.SSSlastChangedUpTo
- (Optional) The end time (inclusive) of the time range when the user task instance was changed for the
last time. Must be greater or equal to the value of the 'lastChangedFrom' parameter if the
latter is specified. Evaluated using the logical 'or' operator with the value of the
'lastChangedAt' parameter if the latter is specified. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2. yyyyMMddHHmmss.SSSdueDate
- (Optional) The due date of the user task instance. Evaluated using the logical 'or' operator
with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are
specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2.
yyyyMMddHHmmss.SSSdueDateFrom
- (Optional) The start time (inclusive) of the due date time range for the user task instance. Must be
less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if
the latter is specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2.
yyyyMMddHHmmss.SSSdueDateUpTo
- (Optional) The end time (inclusive) of the due date time range for the user task instance. Must be
greater or equal to the 'dueDateFrom' parameter if the latter is specified. Evaluated using
the logical 'or' operator with the value of the 'dueDate' parameter if the latter is
specified. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2.
yyyyMMddHHmmss.SSSpriority
- (Optional) The priority of the user task instance. The values are case-insensitive.status
- (Optional) The status of the user task instance. The values are case-insensitive.recipientUsers
- (Optional) The users who must be among the recipient users of the user task instance. A user task
instance has to match at least one of the recipient users specified. Specify the users by repeating
this parameter multiple times, with one user each.recipientGroups
- (Optional) The groups which must be among the recipient groups of the user task instance. A user task
instance has to match at least one of the recipient groups specified. Specify the groups by repeating
this parameter multiple times, with one user each.containsText
- (Optional) Text, which should be contained in at least one of the following fields of the user task
instance: * subject * description * activityId * id * processor * workflowDefinitionId *
workflowInstanceId Performed filtering is case-insensitive. You must not use this parameter more than
once.attributesExampleCustomAttribute
- (Optional) Example of a parameter that filters task instances by the value of the custom task
attribute with the ID 'ExampleCustomAttribute'. You can specify parameters for other
attributes in an analogous way. If you specify a parameter several times, the logical operators apply
as outlined in the overall description of this API. If custom task attributes with different IDs are
present in the URL, only tasks which contain all of them with the values specified will be returned as
a response to the request. If a query by custom task attributes matches too many task definitions, you
have to limit the query further. Refer, for example, to parameter 'definitionId'.definitionId
- (Optional) The definition ID of the user task. It consists of the ID of the task defined in the
workflow definition (task definition ID) as well as the workflow definition ID delimited by an
'@' sign. For optimal performance, specify this parameter when searching for tasks by custom
task attributes. If the custom task attribute IDs from the query match more than 50 task definitions,
you have to specify one or more task definition IDs when searching for tasks by custom task
attributes.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<TaskInstance> queryInstances() throws RestRequestException
Retrieve instances by query parameters
Retrieves user task instances by parameters. If no parameters are specified, all instances with status READY, RESERVED, CANCELED, or COMPLETED are returned. Parameters for different attributes of the instance are evaluated using the logical 'and' operator. If a parameter is specified multiple times, results are matched using the logical 'or' operator, unless noted otherwise. Empty parameters are treated as if they were not specified. By default, returned tasks are sorted by creation time in ascending order. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET
200 - Returns a list of user task instances.
400 - Incorrect format or structure of the provided request body.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
RestRequestException
- if an error occurs while attempting to invoke the API@Nonnull public RestResponse updateInstance(@Nonnull String taskInstanceId, @Nonnull UpdateTaskInstancePayload body) throws RestRequestException
Update task by ID
Updates the status of a user task, its properties, for example, the subject, and its context with the attributes provided in the request body. Depending on the provided attributes, the user might need administrative privileges for the task instance. Without administrative privileges, a user can only set the status to COMPLETED. Optionally, the user can change the context when completing the task. Note that patching a translated subject or description is not supported. That means, that GET requests that are executed on a translated user task do not display the patched text. For more information, see the workflow service documentation on the [SAP Help Portal](https://help.sap.com/viewer/e157c391253b4ecd93647bf232d18a83/Cloud/en-US/fe41c54d61fa4710b34f2afe11b5d00e.html). Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scopes: TASK_COMPLETE, TASK_UPDATE
204 - Depending on the request, either the task has been COMPLETED and the context updated, or the task properties have been updated.
400 - Incorrect format or structure of the provided request body.
401 - Unauthorized. You have not provided valid authentication credentials to access the resource.
403 - Access forbidden. You have not the required permissions to access the resource.
404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.
409 - The operation could not be executed because of another activity in the background. Please try again later.
422 - The task cannot be updated for one of the following reasons: The values submitted for updating the property cannot be resolved or became invalid after resolution. The context provided in the request body contains prohibited fields or the status in the request body is invalid.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
500 - Internal server error. The operation you requested led to an error during execution.
taskInstanceId
- The ID of the user task instance that is to be updated. The ID is 36 characters long.body
- Specify the request body according to the given schema. The length of the request body is limited to
ensure optimal operation of the service.RestRequestException
- if an error occurs while attempting to invoke the APICopyright © 2021 SAP SE. All rights reserved.