clsPublishMSMQ Step
Description:
This step uses the MSMQ service to publish/send messages.
Inputs
- machineName –Server Name where Message queue exists (Is Required)
- queueName – The Queue to send message (Is Required)
- IsPublic – To check queue is public or private
- messageLabel – Label for message
- messageBody – Message Body to send
Returns
- True – step executed successfully
- False – step failed to execute
Usage:
MSMQ is a queue service built into the Microsoft Windows operating system. For more information, please look at the Windows documentation on MSMQ.
To install MSMQ, run OptionalFeatures at a command prompt to open the 'Windows Features' dialog.
In the feature tree of the dialog, Check the top-level feature 'Microsoft Message Queue (MSMQ) Server.' This also checks the sub-feature 'Microsoft MessageQueue (MSMQ) Server Core.' The dialog should look like this:
After the message queues are configured in Computer Management, the list is displayed in this way for reference.
Example:
Let’s build and execute the “clsPublishMSMQDef” example.
- Create a new definition called “clsPublishMSMQDef”
- Select the definition and click the “design” button
- Drag the above steps to the canvas and connect
- Click on the “clsPublishMSMQ” step to configure its “Settings” properties. Give the step a name and provide a machine name.
- Click on the “clsPublishMSMQ” step to configure its “Advanced” properties. If the message queue is private, configure “No.”
- The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.
- Save the process definition, create a new process instance, and execute. The process step should publish/send messages to the queue as configured.
Definition Sample:
You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.