@Component(value="com.sap.cloud.sdk.services.scp.workflow.cf.api.FormsApi") @Beta public class FormsApi extends AbstractRestService
apiClient
Constructor and Description |
---|
FormsApi(HttpDestinationProperties httpDestination)
Instantiates this API class to invoke operations on the the Workflow API for Cloud Foundry.
|
Modifier and Type | Method and Description |
---|---|
RestResponse |
delete(String formId)
Delete a form.
|
FormMetaData |
getFormMetadata(String taskInstanceId)
Retrieve form metadata of the given task instance.
|
FormDefinition |
getFormModel(String taskInstanceId)
Retrieve form model of the given task instance.
|
FormDefinition |
getModelForRevision(String formId,
String revisionId)
Retrieve form model by ID and revision.
|
FormDefinition |
getModelForVersion(String formId,
String versionNumber)
Retrieve form model by ID and version number.
|
public FormsApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nonnull public RestResponse delete(@Nonnull String formId) throws RestRequestException
Delete a form.
Undeploys all versions of an existing form. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: FORM_DEFINITION_UNDEPLOY
204 - The request was successful and the form definition was deleted.
403 - Access forbidden. You do not have the required permissions to access the resource.
404 - Form definition not found. Either the payload did not contain a definitionId property or the specified ID was incorrect.
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.
formId
- The ID of the form you want to undeploy. The ID is at most 255 characters long.RestRequestException
- if an error occurs while attempting to invoke the API@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
403 - Access forbidden. You do not have 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 FormDefinition 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.
403 - Access forbidden. You do not have 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 FormDefinition getModelForRevision(@Nonnull String formId, @Nonnull String revisionId) throws RestRequestException
Retrieve form model by ID and revision.
Retrieves the form model with the specified form ID and revision. Roles permitted to execute this operation: - Global roles (retrieve start and task forms): WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Global roles (retrieve start forms only): WorkflowInitiator - Scope: FORM_DEFINITION_GET_MODEL
200 - The deployed form definition model.
403 - Access forbidden. You do not have the required permissions to access the resource.
404 - Either the specified form definition, the specified version within that definition, or the JSON model for that definition version was not found.
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.
formId
- The ID of the form for which the model should be retrieved.revisionId
- The revision of the form for which the model should be retrieved.RestRequestException
- if an error occurs while attempting to invoke the API@Nullable public FormDefinition getModelForVersion(@Nonnull String formId, @Nonnull String versionNumber) throws RestRequestException
Retrieve form model by ID and version number.
Retrieves the model of the specified version of the specified form definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: FORM_DEFINITION_GET_MODEL
200 - The deployed form definition model.
403 - Access forbidden. You do not have the required permissions to access the resource.
404 - Either the specified form definition, the specified version within that definition, or the JSON model for that definition version was not found.
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.
formId
- The form ID for which the model should be retrieved. The form definition ID is at most 255 characters
long.versionNumber
- The version number for which the model should be retrieved. The version number consists of 1 - 10
digits.RestRequestException
- if an error occurs while attempting to invoke the APICopyright © 2020 SAP SE. All rights reserved.