Creating an MQ service
You can create an MQ service to expose a message-based interface to external clients, which can interact asynchronously with workflow automations.
MQ services enable message-driven interactions with workflow automations. An MQ service exposes a message-based interface to external clients, which can send IBM® MQ messages, for example, to trigger processes or service flows asynchronously. This enables loosely coupled, asynchronous interactions between clients and workflow automations.
Messages are read transactionally from the queue to guarantee their delivery and integrity. If a transaction is rolled back, the message is returned to the queue.
IBM MQ is not part of IBM Cloud Pak for Business Automation and needs to be installed and configured externally.
Before you begin
- Set up and configure IBM MQ
- Set up and configure IBM MQ, and create a queue manager. See the IBM MQ documentation
for
instructions. - Create an input queue for your workflow automations
- To enable MQ services, create a new queue on IBM MQ to be used as the input queue
for all automation. See Working with local queues
.
- Enabling MQ services in Business Automation Workflow Authoring and Workflow Process Service Authoring
- Enable MQ by customizing the Liberty custom XML file that is set in the bastudio_configuration.custom_xml parameter. Sensitive information can be added to a secret that is referenced in the bastudio_configuration.custom_secret_name. The settings are merged into the Liberty settings for the component in the custom resource (CR).
- Enabling MQ services in Business Automation Workflow Runtime
- To enable MQ services in Business Automation Workflow Runtime, use baw_configuration[x].liberty_custom_xml and baw_configuration[x].custom_xml_secret_name.
- Enabling MQ services in Workflow Process Service Authoring
- To enable MQ services in Workflow Process Service Authoring, use workflow_authoring_configuration.liberty_custom_xml and workflow_authoring_configuration.custom_xml_secret_name.
Procedure
To create and model your MQ service:
Results
- Using the MQ services
- The AsyncAPI definition of a MQ service describes the operations and their expected message
schemas and the name of the MQ queue. You use this information in the MQ client of your choice to
send messages to the respective queue. For each message, the corresponding service flow or process
of your workflow automation is triggered. The default version is used if you do not specify the
version header.You can get the AsyncAPI definition for your MQ service from the following URL:
where host_name is the host name, port is the port number, custom_prefix is an optional custom prefix, workflow_automation_acronym is the acronym of the workflow automation, snapshot_acronym is an optional snapshot acronym which, if not specified, resolves to either the tip of the default branch in the development environment, or to the default snapshot in a runtime environment, and mq_service_name is the name of the MQ service.http://host_name:port/[custom_prefix/]automationservices/MQ/workflow_automation_acronym/[snapshot_acronym/]mq_service_name/docs