Page History
...
This article describes how to implement a JS7 workflow with two shell jobs that communicate over a Message Queue Service (MQ). These jobs include one job for publishing and one job for receiving and executing JS7 - REST Web Service API calls.
...
- the
js7-jms-example.jar
used in this example., - a configuration file named
js7-jms-example.config
containing credentials for the connection and information about the workflow.
...
- Either download the .jar file from the Active MQ web site and add it to the class path
- or, in the case of a Maven project; , add the following dependency to the project configuration.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Message Server Settings
jms_url = tcp://localhost:61616
jms_queue_name = test
jms_time_to_live = 5000
# JS7 JOC Cockpit Settings
joc_api_url = http://localhost:4444/joc/api/
username = root
password = root
# /orders/add API Settings
controller_id = js7
workflow_path = /myWorkflowToStart |
...
- the
produce
argument specifies the use of a SOSProducer to publish a message (JSON body) to a Message Queue Service. - the
consume
argument specifies the use of a SOSConsumer to read a message (JSON body) from a Message Queue Service andto:- login to the JS7 REST Web Service API,
- send the API call
/orders/add
with the body received from the Message Queue Service and finally to - logout.
The Java executable has to be included in the PATH
environment variable or the Java call has to be adjusted to include the path to the Java executable.
...
Overview
Content Tools