Skip to main content
Question

Pass message from JMS message to workspace.

  • February 3, 2023
  • 3 replies
  • 25 views

Forum|alt.badge.img

I have an automation that starts with a JMS Message that reads ActiveMQ. I have a workspace that processes JSONs from ActiveMQ. How do I configure the automation to pass the JSON message from ActiveMQ to the workspace so that the workspace will use the JSON as the input to process?

3 replies

fgiron
Supporter
Forum|alt.badge.img+25
  • Supporter
  • 92 replies
  • February 3, 2023

In your workspace you have to create a user parameter and use it as the input for your JSON message. Probably the most intuitive thing to do is to use a ParameterFetcher and then use your JSON transformers to parse the attribute containing the JSON. If you are using the JSON Reader it might be easier to use an AttributeFileWriter and a FeatureReader to replace your Reader.

In your automation, you will have pass the JSON from your trigger to the user parameter you've just created using the automation keys.

I hope this helps.


Forum|alt.badge.img
  • Author
  • 34 replies
  • February 3, 2023

In your workspace you have to create a user parameter and use it as the input for your JSON message. Probably the most intuitive thing to do is to use a ParameterFetcher and then use your JSON transformers to parse the attribute containing the JSON. If you are using the JSON Reader it might be easier to use an AttributeFileWriter and a FeatureReader to replace your Reader.

In your automation, you will have pass the JSON from your trigger to the user parameter you've just created using the automation keys.

I hope this helps.

Thank you for your response. When testing in Workbench I used the JMSReceiver and the JSON was the jms_content value so I did not need a reader. I was able to use the jms_content attribute (the JSON) and then further process it. When migrating to Server I created an Automation and I added a JMS Message to listen to ActiveMQ and published my workspace as a service without the JMSReceiver. I was unsure how to pass the JMS Message "message" with the JSON to the workspace. Sounds like I need to create a parameter in the workspace and pass it to the parameter. Thanks, David


fgiron
Supporter
Forum|alt.badge.img+25
  • Supporter
  • 92 replies
  • February 3, 2023

Thank you for your response. When testing in Workbench I used the JMSReceiver and the JSON was the jms_content value so I did not need a reader. I was able to use the jms_content attribute (the JSON) and then further process it. When migrating to Server I created an Automation and I added a JMS Message to listen to ActiveMQ and published my workspace as a service without the JMSReceiver. I was unsure how to pass the JMS Message "message" with the JSON to the workspace. Sounds like I need to create a parameter in the workspace and pass it to the parameter. Thanks, David

Exactly, that's it!