Interacting with the ECC queue

MID server background scripts use the ECC Queue. To understand what they do, and potentially replicate them, just write a record to the ECC Queue table in the same way. Use JavascriptProbe as Topic and use Payload to pass through an XML snippet with a script parameter. Follow these steps:

  1. Navigate to ECC > Queue, and click on New. Use these values:
    • Agent: mid.server.<name> (Mine is mid.server.midserver)
    • Topic: JavascriptProbe
    • Queue: output
    • Payload:
<parameters>
<parameter name="script" value="'Hello, world! ' + (1 + 2 + 3);"/>
</parameters>
  1. Navigate to ECC > Queue, sort by Created, and watch for the reply that has a Topic of JavascriptProbe:

The response in the XML should be

<output>Hello, world! 6</output> ...

Get ServiceNow: Building Powerful Workflows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.