The Perspectium DataSync for ServiceNow Agent supports the reading of command query messages from ServiceNow and share requested records from .csv files back to a ServiceNow instance. This Agent configuration mode is referred to as the Command File Sharer Agent.
Prerequisites
First, you will need to set up one of the Perspectium DataSync Agents.
You will also need to get started with Replicator for ServiceNow and commit a Perspectium update set that creates transform maps in your ServiceNow instance (To request one of these update sets, contact Perspectium Support).
Finally, you should stop running your DataSync Agent before making any Agent configuration changes.
Procedure
To configure your DataSync Agent to run as a Command File Sharer Agent, follow these steps:
Update ServiceNow query properties
Log into your sharing/source ServiceNow instance and navigate to Perspectium > Control and Configuration > Query Properties. Then, 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 | ServiceNow table name that you want the Command Sharer Agent to query |
command_sharer.queue_name | ServiceNow inbound queue name that you want the query messages to be sent to |
NOTE: Optionally, you can change the command_sharer.file_separator property, but its value will be set to @ by default.
Access your agent.xml configuration file
Navigate to the directory where you saved your agent.xml file when installing your DataSync Agent.
Delete database directives
Delete the following directives nested within the <task> tag:
- <database_type>
- <database_server>
- <database_port>
- <database_user>
- <database_password>
- <database_parms>
- <database_column_max_size>
- <database>
Add Command File Sharer directives
Within the <task> tag, nest the following directives:
Directive | Description | Required? |
---|---|---|
<handler> | Defines the handler that the Agent will use to listen for command query messages. Set this directive's value to com.perspectium.replicator.file.CSVFileSharer. | Yes |
<topic> | Default directive for Command File Sharer topic. | Yes |
<type> | Default directive for Command File Sharer type. | Yes |
<name> | Default directive for Command File Sharer name. | Yes |
<key> | Default directive for Command File Sharer key. | Yes |
<schedule> | Enter ondemand as this directive's value to enable your DataSync Agent to share files on-demand to your ServiceNow instance. | Yes |
<ondemand_connection> | 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” | Yes |
Save your agent.xml
Save the changes you've made to your agent.xml and close the file. An example agent.xml configuration for a Command File Sharer Agent is shown below:
<?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>
Run your Share by Last Update DataSync Agent
After configuring your agent.xml file to support your Command File Sharer Agent, start running your DataSync Agent again.