Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • the js7-jms-example.jar used in this example,
  • a configuration file named the js7-jms-example.config configuration file containing credentials for the connection and information about the workflow.

...

Code Block
languagexml
titleMaven dependency for activemq-all
collapsetrue
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>5.15.0</version>
</dependency>
  • Adjust the js7-jms-example.config configuration file to your own environment.

language
Code Block
perltitleJMS configuration file: js7_-jms_-example.config
linenumberstrue
collapsetrue
# Message Queue ServerService 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

...

Note
Make sure that the js7-jms-example.config configuration file from the archive is stored in the same path as the js7-jms-example.jar library used in the workflow.
Code Block
languagejs
titleWorkflow Configuration
linenumberstruejms_test
collapsetrue
{
  "version": "1.1.0",
  "timeZone": "Europe/Berlin",
  "instructions": [
    {
      "TYPE": "Execute.Named",
      "jobName": "producer_job",
      "label": "job_produce"
    },
    {
      "TYPE": "Execute.Named",
      "jobName": "consumer_job",
      "label": "job_consume"
    }
  ],
  "jobs": {
    "producer_job": {
      "agentName": "standaloneAgent",
      "executable": {
        "TYPE": "ShellScriptExecutable",
        "script": "java -jar C:/tmp/js7-jms-example.jar produce",
        "v1Compatible": false
      },
      "skipIfNoAdmissionForOrderDay": false,
      "parallelism": 1,
      "graceTimeout": 15,
      "failOnErrWritten": false,
      "warnOnErrWritten": false,
      "title": "produce"
    },
    "consumer_job": {
      "agentName": "standaloneAgent",
      "executable": {
        "TYPE": "ShellScriptExecutable",
        "script": "java -jar C:/tmp/js7-jms-example.jar consume",
        "v1Compatible": false
      },
      "skipIfNoAdmissionForOrderDay": false,
      "parallelism": 1,
      "graceTimeout": 15,
      "failOnErrWritten": false,
      "warnOnErrWritten": false,
      "title": "consumer"
    }
  }
}

...