User Tools

Site Tools


replicator_agent_command_query_sharer

Command File Sharer for Replicator Agent

Dubnium

Command File Sharer is a configuration option for the Replicator Agent that enables the Agent to read command query messages from ServiceNow and share requested records from .csv files back to a ServiceNow instance.

Prerequisites

1. First, make sure to install the Replicator Agent.
2. In your ServiceNow instance, commit the Perspectium Core Update Set for ServiceNow and the Command File Sharer Update Set for ServiceNow.
3. You will also need to create an import set table and create a transform map in your ServiceNow instance.

Configuration

To enable Command File Sharer:

1. Log into your ServiceNow instance and navigate to the Query Properties module.
2. Modify the Value fields by clicking into each of the properties below and then clicking Update to save your changes:

Property Description
command_sharer.directory Directory where the file is for the Command Sharer Agent to share
command_sharer.table_name Table name that you want the Command Sharer Agent to query
command_sharer.queue_name Queue name that you want the query messages to be sent to

NOTE: The command_sharer.file_separator property can optionally be changed but will be set to @ by default.

3. Locate the agent.xml file in the directory specified during installation.
4. Add the following directives within the <task> tags in the agent.xml file:

Directive Directive Value Description
<handler> com.perspectium.replicator.file.CSVFileSharer Defines the handler that the Agent will use to listen for command query messages. Ensure that this directive's value is set to com.perspectium.replicator.file.CSVFileSharer in order to enable command file sharing.
<topic> replicator Default directive for Command File Sharer topic.
<type> agent Default directive for Command File Sharer type.
<name> .bulk Default directive for Command File Sharer name.
<key> will be overridden Default directive for Command File Sharer key.
<schedule> ondemand Entering ondemand as this directive's value to enable the Replicator Agent to share files on-demand to your ServiceNow instance.
<ondemand_connection>
amqp://localhost
Defines the local host authentication information and ServiceNow outbound message queue name. Arguments: user = “user name to log into local host”, password = “password to log into local host”, queue = “queue name where Agent should listen for command query messages from ServiceNow”


Example Agent.xml File Configuration

Below is an example of what your agent.xml file might look like after configuring the file for command file sharing:

<?xml version="1.0" encoding="ISO-8859-1"?>
<config>
  <agent>
    <share>
      <task>
        <task_name>file_command_sharer</task_name>
        <message_connection user="user" use_basic_consume="true" 
         password="password">amqp://demo.perspectium.net
	</message_connection>
        <encryption_key>The cow jumped over the moon</encryption_key>
        <handler>com.perspectium.replicator.file.CSVFileSharer</handler>
        <topic>replicator</topic>
        <type>agent</type>
        <name>.bulk</name>
        <key>will be overridden</key>
        <schedule>ondemand</schedule>
        <ondemand_connection user="user" password="password" 
         queue="psp.servicenow.replicator.queue_name">amqp://demo.perspectium.net
	</ondemand_connection>
        <max_writes_per_connect>7</max_writes_per_connect>
      </task>
    </share>
  </agent>
</config>

For more information about Replicator Agent configuration, see Replicator Agent Configuration.

replicator_agent_command_query_sharer.txt · Last modified: 2018/10/25 16:52 by timothy.pike