@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen") public class WorkflowInstancesApi extends AbstractOpenApiService
apiClient
Constructor and Description |
---|
WorkflowInstancesApi(ApiClient apiClient)
Instantiates this API class to invoke operations on the Workflow API for Cloud Foundry based on a given
ApiClient . |
WorkflowInstancesApi(HttpDestinationProperties httpDestination)
Instantiates this API class to invoke operations on the Workflow API for Cloud Foundry.
|
Modifier and Type | Method and Description |
---|---|
WorkflowInstance |
getInstance(String workflowInstanceId)
Retrieve workflow instance by ID
|
WorkflowInstance |
getInstance(String workflowInstanceId,
String acceptLanguage,
String $expand)
Retrieve workflow instance by ID
|
AttachmentsContext |
getInstanceAttachments(String workflowInstanceId)
Retrieve instance attachments
|
List<CustomAttribute> |
getInstanceAttributes(String workflowInstanceId)
Retrieve custom workflow attributes by workflow instance ID
|
List<CustomAttribute> |
getInstanceAttributes(String workflowInstanceId,
String acceptLanguage)
Retrieve custom workflow attributes by workflow instance ID
|
Object |
getInstanceContext(String workflowInstanceId)
Retrieve instance context
|
List<WorkflowInstanceErrorMessage> |
getInstanceErrorMessages(String workflowInstanceId)
Retrieve error messages
|
WorkflowInstanceRoles |
getInstanceRoles(String workflowInstanceId)
Retrieve instance roles
|
List<WorkflowInstanceExecutionLog> |
queryInstanceExecutionLogs(String workflowInstanceId)
Retrieve execution logs
|
List<WorkflowInstanceExecutionLog> |
queryInstanceExecutionLogs(String workflowInstanceId,
String acceptLanguage)
Retrieve execution logs
|
List<WorkflowInstance> |
queryInstances()
Retrieve all instances by query parameters
|
List<WorkflowInstance> |
queryInstances(String acceptLanguage,
String $orderby,
Integer $skip,
Integer $top,
String $inlinecount,
String $expand,
String id,
String definitionId,
String definitionVersion,
String status,
String startedAt,
String startedFrom,
String startedUpTo,
String completedAt,
String completedFrom,
String completedUpTo,
String startedBy,
String subject,
String containsText,
String businessKey,
String rootInstanceId,
String parentInstanceId,
String attributesExampleCustomAttribute)
Retrieve all instances by query parameters
|
OpenApiResponse |
setInstanceAttachments(String workflowInstanceId,
AttachmentsContext body)
Overwrite instance attachments
|
OpenApiResponse |
setInstanceContext(String workflowInstanceId,
Object body)
Overwrite instance context
|
WorkflowInstance |
startInstance(WorkflowInstanceStartPayload body)
Start a new instance
|
WorkflowInstance |
startInstance(WorkflowInstanceStartPayload body,
String acceptLanguage)
Start a new instance
|
OpenApiResponse |
updateInstance(String workflowInstanceId,
WorkflowInstanceUpdatePayload body)
Update instance
|
OpenApiResponse |
updateInstanceContext(String workflowInstanceId,
Object body)
Update instance context
|
OpenApiResponse |
updateInstanceRoles(String workflowInstanceId,
WorkflowInstanceRolesUpdatePayload body)
Update instance roles
|
OpenApiResponse |
updateInstances(List<WorkflowInstancesUpdatePayload> body)
Delete instance by ID
|
public WorkflowInstancesApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nullable public List<WorkflowInstance> queryInstances(@Nullable String acceptLanguage, @Nullable String $orderby, @Nullable Integer $skip, @Nullable Integer $top, @Nullable String $inlinecount, @Nullable String $expand, @Nullable String id, @Nullable String definitionId, @Nullable String definitionVersion, @Nullable String status, @Nullable String startedAt, @Nullable String startedFrom, @Nullable String startedUpTo, @Nullable String completedAt, @Nullable String completedFrom, @Nullable String completedUpTo, @Nullable String startedBy, @Nullable String subject, @Nullable String containsText, @Nullable String businessKey, @Nullable String rootInstanceId, @Nullable String parentInstanceId, @Nullable String attributesExampleCustomAttribute) throws OpenApiRequestException
Retrieve all instances by query parameters
Retrieves workflow instances by parameters. If no parameters are specified, all RUNNING, or ERRONEOUS instances are returned. Parameters for different attributes of the instance are evaluated using the logical 'and' operator. If multiple parameters are specified for the same attribute or 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 given. 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: WORKFLOW_INSTANCE_GET
200 - Returns a list of workflow instances.
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.
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.$orderby
- (Optional, default to startedAt desc) The attribute and direction by which workflow instances 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.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query. If not
specified, the results are sorted by the 'startedAt' attribute, in descending order. * id asc
- Ascending, from A to Z case-sensitive. * id desc - Descending, from Z to A case-sensitive. *
definitionId asc - Ascending, from A to Z case-sensitive. * definitionId desc - Descending, from Z to
A case-sensitive. * definitionVersion asc - Ascending, from A to Z case-sensitive. * definitionVersion
desc - Descending, from Z to A case-sensitive. * startedAt asc - Ascending, from A to Z
case-sensitive. * startedAt desc - Descending, from Z to A case-sensitive. * completedAt asc -
Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not
yet COMPLETED workflow instances first. * completedAt desc - Descending, from the most recently
COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
* startedBy asc - Ascending, from A to Z case-sensitive. * startedBy desc - Descending, from Z to A
case-sensitive. * subject asc - Ascending, from A to Z case-sensitive, workflow instances without
subject first. * subject desc - Descending, from Z to A case-sensitive, workflow instances without
subject last. * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without
business key first. * businessKey desc - Descending, from Z to A case-sensitive, workflow instances
without business key last.$skip
- (Optional, default to 0) Specify 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. Refer also to the $top
parameter.$top
- (Optional, default to 100) Specify 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. Refer also to the $skip
parameter.$inlinecount
- (Optional, default to none) Specify whether the total count of the workflow 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.$expand
- (Optional) You can request custom workflow attributes to become part of the workflow instance 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 the
output of the workflow instance. Note that labels as well as the order of the custom workflow
attributes in which they are returned, are taken from the latest versions of the workflow definitions
where these attributes are present.id
- (Optional) Specify the workflow instance ID. The workflow instance ID is 36 characters long.definitionId
- (Optional) Specify the ID of the workflow definition. The ID is at most 64 characters long.definitionVersion
- (Optional) Specify the version of the workflow definition.status
- (Optional) Specify the status of the workflow instance. The values are not case-sensitive.startedAt
- (Optional) Specify at what time the workflow instance was started. Supports two date formats 1)
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS.startedFrom
- (Optional) Specify the beginning (inclusive) of the time range during which a returned workflow was
started. Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 1.
yyyyMMddHHmmss.SSS The parameter operates on the 'startedAt' attribute of a workflow instance.
It is combined with the following parameters, if available: 'startedUpTo' parameter using the
logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.startedUpTo
- (Optional) Specify the end (inclusive) of the time range during which a returned workflow was started.
Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 1. yyyyMMddHHmmss.SSS The
parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with
the following parameters, if available: 'startedFrom' parameter using the logical
'and' operator; 'startedAt' parameter using the logical 'or' operator.completedAt
- (Optional) Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.
Supports two date formats: 1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 1. yyyyMMddHHmmss.SSScompletedFrom
- (Optional) Specify the beginning (inclusive) of the time range during which a returned workflow was
changed to status COMPLETED or CANCELED. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 1. yyyyMMddHHmmss.SSS The parameter operates on the
'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator;
'completedAt' parameter using the logical 'or' operator.completedUpTo
- (Optional) Specify the end (inclusive) of the time range during which a returned workflow was changed
to status COMPLETED or CANCELED. Supports two date formats: 1.
yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 1. yyyyMMddHHmmss.SSS The parameter operates on the
'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator;
'completedAt' parameter using the logical 'or' operator.startedBy
- (Optional) Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at
most 255 characters long.subject
- (Optional) Specify the subject of the workflow instance, in UTF-8 encoding. The subject of a workflow
instance is limited to 255 characters.containsText
- (Optional) Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject,
startedBy, and businessKey attributes of the workflow instances. The maximum length of these
attributes is 255 characters.businessKey
- (Optional) Specify the business key of the workflow instance, in UTF-8 encoding. The business key of a
workflow instance is limited to 255 characters.rootInstanceId
- (Optional) Specify the workflow root instance ID. The workflow root instance ID is 36 characters long.parentInstanceId
- (Optional) Specify the workflow parent instance ID. The workflow parent instance ID is 36 characters
long or it can be null.attributesExampleCustomAttribute
- (Optional) Example of a parameter that filters workflow instances by the value of the custom workflow
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 workflow attributes with different IDs
are present in the URL, only workflow instances which contain all of them with the values specified
will be returned as a response to the request. If a query by custom workflow attributes matches too
many workflow definitions, you have to limit the query further. Refer, for example, to parameter
'definitionId'.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<WorkflowInstance> queryInstances() throws OpenApiRequestException
Retrieve all instances by query parameters
Retrieves workflow instances by parameters. If no parameters are specified, all RUNNING, or ERRONEOUS instances are returned. Parameters for different attributes of the instance are evaluated using the logical 'and' operator. If multiple parameters are specified for the same attribute or 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 given. 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: WORKFLOW_INSTANCE_GET
200 - Returns a list of workflow instances.
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.
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.
OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse updateInstances(@Nonnull List<WorkflowInstancesUpdatePayload> body) throws OpenApiRequestException
Delete instance by ID
Modifies the given workflow instances according to the specified operations. Currently, the only operation supported is the deletion of workflow instances. You can at most specify 10000 instances to delete in one API call. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: WORKFLOW_INSTANCES_UPDATE
200 - Requested operations were completed successfully. Note: You also receive this response code if you have not requested an operation on any of the workflow instances or if the list of workflow instances was empty.
202 - The request was successful and corresponding operations with process instances will be performed asynchronously. The response will include the header 'Location' that points to a dedicated resource. Using this resource you can track the status of the operation.
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.
422 - The request body contains at least one entry for which you have not provided a workflow instance ID.
429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.
body
- Specify the request body according to the given schema. Note that the length of the request body is
limited to ensure optimal operation of the service.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public WorkflowInstance startInstance(@Nonnull WorkflowInstanceStartPayload body, @Nullable String acceptLanguage) throws OpenApiRequestException
Start a new instance
Starts a new workflow instance of the provided workflow definition. Specify the ID of the workflow definition in the body. The workflow instance automatically starts based on the latest deployed version of the definition. Roles permitted to execute this operation: - Global roles: WorkflowInitiator - Scope: WORKFLOW_INSTANCE_START
201 - Returns the newly created workflow instance.
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 - Workflow definition not found. Either the payload does not contain a definitionId property or the specified ID is incorrect.
422 - The workflow context in the request body contains invalid keys or values.
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.
body
- (Required) Specify the request body according to the given schema. Note that the length of the request
body is limited to ensure optimal operation of the service.acceptLanguage
- (Optional) Provide a preferred language. If a translation is available, relevant texts are returned in
this language.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public WorkflowInstance startInstance(@Nonnull WorkflowInstanceStartPayload body) throws OpenApiRequestException
Start a new instance
Starts a new workflow instance of the provided workflow definition. Specify the ID of the workflow definition in the body. The workflow instance automatically starts based on the latest deployed version of the definition. Roles permitted to execute this operation: - Global roles: WorkflowInitiator - Scope: WORKFLOW_INSTANCE_START
201 - Returns the newly created workflow instance.
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 - Workflow definition not found. Either the payload does not contain a definitionId property or the specified ID is incorrect.
422 - The workflow context in the request body contains invalid keys or values.
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.
body
- Specify the request body according to the given schema. Note that the length of the request body is
limited to ensure optimal operation of the service.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public AttachmentsContext getInstanceAttachments(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve instance attachments
Retrieves the attachments information for a workflow instance independent of its status. 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: WORKFLOW_INSTANCE_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 workflow 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.
workflowInstanceId
- The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36
characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse setInstanceAttachments(@Nonnull String workflowInstanceId, @Nonnull AttachmentsContext body) throws OpenApiRequestException
Overwrite instance attachments
Overrides the attachments information for a workflow instance independent of its status. Take special care when using this API, because it will override the workflow attachments, that is, it might change the workflow in ways that are incompatible with the expectations of the tasks in the workflow definition. Before changing, we recommend that you suspend the workflow instance and check that the execution has come to a halt, that is, no further steps are being added to the execution log. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_ATTACHMENTS
204 - The attachments information has been updated.
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 workflow instance.
409 - The operation could not be executed because of another activity in the background. Please try again later.
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.
workflowInstanceId
- Specify the workflow instance ID for which the attachments should be overridden. The workflow instance
ID is 36 characters long.body
- Specify the new information according to the given schema.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<CustomAttribute> getInstanceAttributes(@Nonnull String workflowInstanceId, @Nullable String acceptLanguage) throws OpenApiRequestException
Retrieve custom workflow attributes by workflow instance ID
Retrieves custom workflow attributes for a workflow instance. Labels as well as the order of the custom workflow 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.] - Scope: WORKFLOW_INSTANCE_GET_ATTRIBUTES
200 - Returns the custom workflow attributes for the requested 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 workflow 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.
workflowInstanceId
- (Required) The ID of the workflow instance for which the custom workflow 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.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<CustomAttribute> getInstanceAttributes(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve custom workflow attributes by workflow instance ID
Retrieves custom workflow attributes for a workflow instance. Labels as well as the order of the custom workflow 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.] - Scope: WORKFLOW_INSTANCE_GET_ATTRIBUTES
200 - Returns the custom workflow attributes for the requested 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 workflow 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.
workflowInstanceId
- The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID
is 36 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public Object getInstanceContext(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve instance context
**Warning: Users with the role \"WorkflowAdmin\" are no longer able to view the workflow context. To allow these users to continue to view the context, assign the role \"WorkflowContextViewer\" to them.** Retrieves the context for a workflow instance independent of its status. 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.] - Scope: WORKFLOW_INSTANCE_GET_CONTEXT
200 - Returns the context 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 workflow 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.
workflowInstanceId
- The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36
characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse updateInstanceContext(@Nonnull String workflowInstanceId, @Nonnull Object body) throws OpenApiRequestException
Update instance context
Modifies parts of the context for a workflow instance independent of its status. Take special care when using this API, because it might change the workflow context in ways that are incompatible with the expectations of the tasks in the workflow definition. Before changing the context, we recommend that you suspend the workflow instance and make sure that the execution has come to a halt, that is, that no further steps are being added to the execution log. Refer to PATCH on the parent resource and GET on the 'execution-logs' sibling resource. Roles permitted to execute this operation: - Global roles: WorkflowContextAdmin - Instance-specific roles: contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_CONTEXT
204 - The context has been updated.
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 workflow instance.
409 - The operation could not be executed because of another activity in the background. Please try again later.
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.
workflowInstanceId
- Specify the workflow instance ID for which the context should be modified. The workflow instance ID is
36 characters long.body
- Specify the modified parts of the context. Note that the modification is limited by the allowed
content length of the request body. The length is restricted to ensure optimal operation of the
service.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse setInstanceContext(@Nonnull String workflowInstanceId, @Nonnull Object body) throws OpenApiRequestException
Overwrite instance context
Overrides the context for a workflow instance independent of its status. Take special care when using this API, because it will override the workflow context, that is, it might change the workflow context in ways that are incompatible with the expectations of the tasks in the workflow definition. Before changing the context, we recommend that you suspend the workflow instance and check that the execution has come to a halt, that is, no further steps are being added to the execution log. Refer to PATCH on the parent resource and GET on the 'execution-logs' sibling resource. Roles permitted to execute this operation: - Global roles: WorkflowContextAdmin - Instance-specific roles: contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_CONTEXT
204 - The context has been updated.
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 workflow instance.
409 - The operation could not be executed because of another activity in the background. Please try again later.
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.
workflowInstanceId
- Specify the workflow instance ID for which the context should be overridden. The workflow instance ID
is 36 characters long.body
- Specify the new context according to the given schema. The length of the request body is limited to
ensure optimal operation of the service.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<WorkflowInstanceErrorMessage> getInstanceErrorMessages(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve error messages
Retrieves current error messages for a workflow instance. Roles permitted to execute this operation: - Global roles: WorkflowDeveloper, WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_ERROR_MESSAGES
200 - Returns a list of error messages.
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 workflow 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.
workflowInstanceId
- The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is
36 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<WorkflowInstanceExecutionLog> queryInstanceExecutionLogs(@Nonnull String workflowInstanceId, @Nullable String acceptLanguage) throws OpenApiRequestException
Retrieve execution logs
Retrieves execution logs for a given workflow 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: WORKFLOW_INSTANCE_GET_EXECUTION_LOGS
200 - Returns a list of execution logs.
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 workflow 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.
workflowInstanceId
- (Required) The workflow instance ID for which the execution logs should be retrieved. The workflow
instance ID is 36 characters long.acceptLanguage
- (Optional) Provide a preferred language. If a translation is available, relevant texts are returned in
this language.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<WorkflowInstanceExecutionLog> queryInstanceExecutionLogs(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve execution logs
Retrieves execution logs for a given workflow 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: WORKFLOW_INSTANCE_GET_EXECUTION_LOGS
200 - Returns a list of execution logs.
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 workflow 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.
workflowInstanceId
- The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is
36 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public WorkflowInstance getInstance(@Nonnull String workflowInstanceId, @Nullable String acceptLanguage, @Nullable String $expand) throws OpenApiRequestException
Retrieve workflow instance by ID
Retrieves the workflow instance with the specified workflow 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.] - Scope: WORKFLOW_INSTANCE_GET
200 - The requested workflow instance.
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 workflow 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.
workflowInstanceId
- (Required) The ID of the workflow instance, which should be retrieved. The workflow instance 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 workflow attributes to become part of the workflow instance 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 the
output of the workflow instance. Note that labels as well as the order of the custom workflow
attributes in which they are returned, are taken from the latest versions of the workflow definitions
where these attributes are present.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public WorkflowInstance getInstance(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve workflow instance by ID
Retrieves the workflow instance with the specified workflow 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.] - Scope: WORKFLOW_INSTANCE_GET
200 - The requested workflow instance.
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 workflow 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.
workflowInstanceId
- The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters
long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse updateInstance(@Nonnull String workflowInstanceId, @Nonnull WorkflowInstanceUpdatePayload body) throws OpenApiRequestException
Update instance
Modifies the properties of a given workflow instance, for example, sets its status to CANCELED or RUNNING. Status changes may not take effect immediately, due to asynchronous processing of the request. When you change the status to CANCELED, note the following: * Workflow instances in CANCELED status are considered final, that is, no further changes are allowed. This is valid as well for other APIs and the processing according to the workflow definition. * Workflow instances in CANCELED status stop processing as soon as the system allows. When you are changing the status to SUSPENDED, note the following: * Status SUSPENDED manually and temporarily suspends processing. * You can choose to suspend the specified instance or the whole cascade by setting boolean parameter \"cascade\". By default, the parameter is false. When set to true, the operation is cascaded to its referenced subflow instances. * Workflow instances in SUSPENDED status stop processing as soon as the system allows. * Workflow instances remain in SUSPENDED status until a status change to RUNNING or CANCELED is requested. * While the workflow instance status reported by the respective API might change with immediate effect, follow-up actions might only be successful, after asynchronous processing within the workflow instance actually has stopped. To check whether asynchronous processing is ongoing, analyze the execution logs or check the workflow definition structure. When you are changing the status to RUNNING, note the following: * For workflow instances in ERRONEOUS status, this retries the failed activities. If these activities continue failing, the workflow instance automatically moves again into ERRONEOUS status. * If the workflow instance had previously been suspended while in ERRONEOUS status, failed activities, such as service tasks, are retried. * You can choose to retry or resume the specified instance or the whole cascade by setting boolean parameter \"cascade\". By default, the parameter is false. When set to true, the operation is cascaded to its referenced subflow instances. When you propagate the status change to subflow instances with the 'cascade' parameter, note the following: * The effects outlined above are appropriately applied to the subflow instances. For example, instances in a final status like CANCELED are not changed by the API. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scopes: WORKFLOW_INSTANCE_CANCEL, WORKFLOW_INSTANCE_RETRY_RESUME, WORKFLOW_INSTANCE_SUSPEND
202 - The request is successful and the properties will be changed asynchronously.
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 workflow instance.
409 - The operation could not be executed because of another activity in the background. Please try again later.
422 - The status provided in the request body was 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.
workflowInstanceId
- The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters
long.body
- The value for the parameter bodyOpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public WorkflowInstanceRoles getInstanceRoles(@Nonnull String workflowInstanceId) throws OpenApiRequestException
Retrieve instance roles
Retrieves the instance-specific role assignments of the given workflow instance. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_ROLES
200 - Returns a list of assigned users and a list of assigned groups for each role on the given 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 workflow 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.
workflowInstanceId
- The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36
characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse updateInstanceRoles(@Nonnull String workflowInstanceId, @Nonnull WorkflowInstanceRolesUpdatePayload body) throws OpenApiRequestException
Update instance roles
Updates the instance-specific role assignments of the given workflow instance. Any of the role assignment properties that is present in the request body will overwrite the existing assignments with the new assignments. Any properties that are either null or not present at all in the request body will leave the corresponding role assignments unchanged. The maximum number of users and groups that can be assigned to each role is limited to 100. The use of expressions as part of the role assignments (e.g. ${context.variable}) is only allowed for workflow instances that are not yet COMPLETED or CANCELED. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_ROLES Examples: - Setting **viewerUsers: \"UserId1, UserId8\"** will remove all existing user assignments of the viewer role and then assign only the two specified users to the role. - Setting **viewerUsers: \"\"** will remove all existing user assignments of the viewer role. - Specifying any non-null **viewerUsers** in the request body and leaving out **viewerGroups** will update the user assignments and leave the group assignments unchanged.
204 - The workflow instance role assignments were updated.
400 - The workflow instance that you specified is already in status COMPLETED or CANCELED and you attempted to use expressions in your operation.
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 workflow instance.
409 - The operation could not be executed because of another activity in the background. Please try again later.
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.
workflowInstanceId
- The workflow instance ID for which the role assignments should be updated. The workflow instance ID is
36 characters long.body
- Specify new role assignments.OpenApiRequestException
- if an error occurs while attempting to invoke the APICopyright © 2021 SAP SE. All rights reserved.