@Component(value="com.sap.cloud.sdk.services.scp.workflow.cf.api.MessagesApi") @Beta public class MessagesApi extends AbstractRestService
apiClient
Constructor and Description |
---|
MessagesApi(HttpDestinationProperties httpDestination)
Instantiates this API class to invoke operations on the the Workflow API for Cloud Foundry.
|
Modifier and Type | Method and Description |
---|---|
List<WorkflowInstanceId> |
sendMessage(MessagesPOST body)
Send message
|
public MessagesApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nullable public List<WorkflowInstanceId> sendMessage(@Nonnull MessagesPOST body) throws RestRequestException
Send message
Sends a message to a set of workflow instances for consumption in intermediate message events. The message is identified by the name specified in the workflow model (request body parameter 'definitionId') and the ID of the workflow model (request body parameter 'workflowDefinitionId'). The message is consumed by the workflow instances that match the following criteria: * The business key specified in the request body matches the business key of the workflow instance. * The workflow instance is not in the SUSPENDED state. * The workflow instance currently waits at the intermediate message event referring to the specified message. Roles permitted to execute this operation: - Global roles: WorkflowMessageSender - Scope: MESSAGE_SEND
200 - Returns a list of workflow instance IDs that consumed the message.
403 - Access forbidden. You do not have the required permissions to access the resource.
422 - The message was not consumed by the intermediate message event. Please see the messages API to verify that your message meets the requirements for successful consumption.
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. 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 © 2020 SAP SE. All rights reserved.