Examples: End Job and Abort Job Payload Parsing

When defining parsings for RA JMS Agent Receiver Jobs with a text-based message type, you can select the End Job and Abort Job for the output type:

  • XML
  • JSON
  • Plain Text
  • YAML

These output types allow you to end or abort a Job. This is most useful when receiving multiple messages. A match value can optionally be entered in the Output Name field. If a match value is entered, the action will be taken if the match value equals the parse result. If no match value is entered, the action will be taken if the parse result is non-empty. A special match value of 'NULL' can be used, it will cause the action to be taken if the parse result is empty.

Ending the Job when the Text 'Done' Is Received

When this Job receives the text 'Done', it will end

  • 'End Job' is selected in the Output Type field.
  • 'Done' is entered in the Output Name field.
  • 'Groovy' is selected in the Parsing Type field.
  • A Groovy expression is entered in the Expression box.
  • Sample input that returns 'Done' is entered in the Input box.

When this Job receives the text 'Done', it will end.

Parsing example

Using Regular Expressions to End or Abort the Job

In the example images below:

  • 'End Job' is selected in the first Output Type field and 'Abort Job' is selected in the second Output Type field.
  • The Output Name fields have no values.
  • 'Regular Expression' is selected in the Parsing Type fields.
  • Regular expressions are entered in the Expression boxes.

When this Job received, it will end if 'COMPLETED' follows any number of characters and it will abort if 'FAIL' follows any number of characters.

Parsing example

Ending the Job When Any Text Is Received

In the example image below: 

  • 'End Job' is selected in the Output Type field.
  • Nothing is entered in the Output Name field.
  • 'XPath' is selected in the Parsing Type field.
  • An XPath expression is entered in the Expression box to get the value of attr1.
  • Sample input that returns 'aa' is entered in the Input box.

When this Job receives any text for attr1, it will end.

Parsing example

Ending the Job When No Text Is Received

In the example image below: 

  • 'End Job' is selected in the Output Type field.
  • 'NULL' is entered in the Output Name field.
  • 'XPath' is selected in the Parsing Type field.
  • An XPath expression is entered in the Expression box to get the value of attr2.
  • Sample input that returns a null value is entered in the Input box.

When this Job receives a null value for attr2, it will end.

Parsing example