This step uses MSMQ service to publish / send message.
- 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
- True – step executed successfully
- False – step failed to execute
MSMQ is a queue service built into Microsoft Windows operating system, for more information please look at Windows documentation on MSMQ.
To instal MSMQ, at a command prompt, run the command OptionalFeatures 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 like this for reference.
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. Provide a name to the step. Provide a machine name.
- Click on the “clsPublishMSMQ” step to configure its “Advanced” properties. Configure “No” if the message queue is private.
- The “Logging” setting configuration is necessary for documentation and also measure the workflow progress and the percent complete. This is acheived 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.