You are currently viewing custom features documentation. To see the documentation for standard functionality in the current release, click here.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Feature available in Helium 6.0.1 release


Attachments are stored in ServiceNow in two separate tables, sys_attachment and sys_attachment_doc. One holds information about the attachment, while the other contains the actual byte data of the attachment. Thus, sending attachment(s) to your database with the DataSync Agent will store the attachment(s) in the two tables mentioned. By including a SysAttachmentHandler in the DataSync Agent configuration, the attachment(s) will no longer be left unprocessed in the sys_attachment and sys_attachment_doc, but instead be built and stored in a new table called attachments.

Prerequisites


(warning) First, you will need to set up one of the Perspectium DataSync Agents.

(warning) You should also stop running your DataSync Agent before making any Agent configuration changes.


Procedure

To handle attachments for your DataSync integration, follow these steps:


Navigate to the directory where you saved your agent.xml file when installing your DataSync Agent.

Open your agent.xml file in a text editing application. Then, add the following directives: 

DirectiveDescriptionRequired?Example Value
<handler>

Name of the Java handler class. In this case, the value for this directive will be com.perspectium.replicator.sql.subscriber.edge.SysAttachmentHandler.

<handler>com.perspectium.replicator.sql.subscriber.edge.SysAttachmentHandler</handler>
Yescom.perspectium.replicator.sql.subscriber.edge.SysAttachmentHandler
<skip_queue/>Self-closing tag that will post the attachment directly to the new attachment table, rather than MBS. Yes
<edge_encryption>

Decrypts messages that have been published from a ServiceNow instance that is leveraging the ServiceNow Edge Encryption feature.

See Edge Encryption/Decryption for DataSync Agent for more information.

ParameterDescriptionValue
keystore

Specifies where the keystore is located (azure or local)

azure
vault_tenant

tenant_id for the vault containing the keystore


vault_url

URL to the Azure KeyVault


vault_principal

principal_id for the KeyVault


principal_secret

Password for the KeyVault


secret_name

Name of the keystore


keystore_passwordPassword for the keystore
keystore_alias

Name of the key alias


alias_password

Password for the key


Yes, if the attachments are edge encrypted.

Otherwise, NOT required. 

See example below.


Example snippet of agent.xml: 

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
    <agent>
        <subscribe>
            <task>
 				<task_name>attachment_processor</task_name>
            	<handler>com.perspectium.replicator.sql.subscriber.edge.SysAttachmentHandler</handler>
				<skip_queue/>              
                .
                .
                .
                 <edge_encryption
                    keystore=""
                    vault_tenant=""
                    vault_url=""
                    vault_principal=""
                    principal_secret=""
                    secret_name=""
                    keystore_password=""
                    keystore_alias=""
                    alias_password="">true</edge_encryption>
            </task>
        </subscribe>
    </agent>
</config>

NOTE: To see other defined tasks in the agent.xml, see DataSync Agent configurations.

After configuring your agent.xml, start running your DataSync Agent again.