This “synchronous” adapter has been provided to specify a timeout period and monitor a reply queue of which is used to help trace a message communication process. A message sent with this adapter will wait and listen to the specified reply queue for a reply acknowledgment of the message. If a response is received matching the original message’s correlation ID, the Business Process can proceed as expected. If no response is received within the specified timeout period, the adapter will throw an exception and other actions can be taken. This allows better control over message communication, the tracing of responses, and meeting specific SLA requirements. The reply queue is specified within standard JMS metadata of each message using the ReplyTo field.
Additionally, the Execute Business Process with Timeout BP task has been created to allow for better control over BP control flow. This task allows for a series of BP sub-tasks to be run and if these tasks do not finish within a specified timeout period, execution of sub-tasks will be halted and “fallback” sub-tasks will be executed instead.
Used with the IMB MQ Sync Adapter, this will allow the adapter to halt task processing of a worker until either the timeout period is met, and future actions can be taken, or the tasks are completed within SLA requirements. Details are provided below.
Using the Synchronous Adapter
- Right-click the Project you wish to add the adapter to, highlight “new” and select the option “Other…”
- Either search for “IBM MQ Sync Adapter” or find the adapter in the Clarify > Adapters subfolder.
- Follow the following prompt of which you can name your adapter. Please ensure you retain the “.ibmmqsync.adapter” file type when naming your adapter. Click Finish.
- Fill in the IBM MQ Sync Adapter fields as you would with the standard IBM MQ Adapter with the only difference being the “Timeout” field specified in milliseconds (ms).
- Ensure that that the messages sent to the queue specified by “Destination Name” contain in their JMS header a properly formatted ReplyTo field as specified by JMS documentation.
Using the "Execute Business Process with Timeout" task
- Within a Business Process, click the green “+” symbol in the top right corner to create a new task. From there click “Click to select task” search for “Execute Business Process with Timeout” as shown below.
- Four new lines should appear under your task. “Execute BPS…” is a heading underneath which designates the Business Processes that will be executed within a specified timeout period. “Fallback on Timeout…” is a heading underneath which designates the subtasks that will be run when the timeout specified expires.
Simply create the tasks desired in the same way normal tasks are. In the example below, a simple BP will run by default. If that sleep task runs longer than the specified timeout, a “Log” task will run. - Click the “Execute BPS…” line and with that line highlighted go to the bottom of the screen and select the “Properties” tab. There the timeout can be designated in seconds.
Comments
0 comments
Please sign in to leave a comment.