@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<ConsumingWorkflowInstance> |
sendMessage(SendMessagePayload body)
Send message
|
public MessagesApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nullable public List<ConsumingWorkflowInstance> sendMessage(@Nonnull SendMessagePayload 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 parameters identifying the workflow instances that should consume the message. The message is consumed by the workflow instances that match the following criteria: * The instance can be a specific match when using its workflow instance ID (request body parameter 'workflowInstanceId'). Or the instance is a generic match when using the ID of the workflow model together with the business key (request body parameters 'workflowDefinitionId' respectively 'businessKey'). You can either use the specific or generic match but not both in the same call. * The workflow instance is not in the SUSPENDED state. * The workflow instance currently waits at the intermediate message event referring to the specified message. The business key of a workflow instance matches if the business key specified in the request body is the same. 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.