Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


HTML
<style>
.release-box {
	height: 30px; 
	width: 100px; 
	padding-top: 8px;
	text-align: center; 
	border-radius: 5px; 
	font-weight: bold; 
	background-color: #8efeb3;  
	border-color: #FCE28A;
}

.release-box:hover {
  	cursor: hand;
    cursor: pointer;
    opacity: .9; 
}
</style>
<meta name="robots" content="noindex">

<div class="release-box">
<a href="https://docs.perspectium.com/display/krypton" style="text-decoration: none; color: #FFFFFF; display: block;">
Krypton
</a>
</div>



Anchor
Top of page
Top of page

Subscribe allows you to read in data into your DataSync Express instance, notably to synchronize your instance with another instance that is sharing data as well as receiving information back from your DataSync Agent when it runs into issues.

To use subscribe, you must first specify a subscribed queue.

Info

Global subscribe is a Subscribe definition that when created, will allow all incoming messages to be subscribed. If there is an existing subscribe definition for a specific table, its definition will override the global definition.




Cross-Scope Access Policies Restrictions

(info) NOTE:

Because of scope app limits, subscribing to table records into ServiceNow (i.e. subscribing to records

bulk

shared from another instance) is limited

since features like Run business rules and Override system fields are not supported

due to cross-scope access

policy restrictions. This would require manual changes to each table to support subscribing properly and is something that we continue to research further.

About before and after subscribe scripts

You can use before/after subscribe scripts to customize how the data will be consumed and stored in your subscribing ServiceNow instance. 

policies. See https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0782299 for more details as subscribe will not be able to update certain fields such as sys_mod_count or number i.e. if subscribing to incidents from another instance, it will not have the same number on this instance as on the sharing instance.

Instead, subscribe will get errors like the following:

Warning

Access to api 'setValue(number)' from scope 'x_perr2_datasync' has been refused due to the api's cross-scope access policy.

Access to api 'setValue(sys_mod_count)' from scope 'x_perr2_datasync' has been refused due to the api's cross-scope access policy.

All other fields will update properly.

To update these fields restricted by ServiceNow's cross-scope access policies, we have a PerspectiumGlobal script include you can import into the Global application scope to be able to update these restricted fields. This script include is provided outside the Perspectium DataSync Express scoped application and is added to your instance using Import XML. 

To install this script include:

  1. Contact Perspectium Support for the PerspectiumGlobal script include.
  2. Change your Application scope to Global if not already in the Global application scope.
  3. Go to System Definition > Script Includes in your ServiceNow instance.
  4. Right-click on a column header (such as Name) and choose Import XML.
  5. Verify the PerspectiumGlobalb  script include is in your instance by searching it by name in the list view of Script Includes.

Once installed, your subscribe will be able to update these restricted fields. No configuration changes are needed in the DataSync Express app.

Before subscribe scripts

These scripts are created with server-side JavaScript and will execute right before a record insert or update, allowing the chance to modify the record before persisting. Within your before subscribe script, you have access to the following variables:

Variable

Description

currentRecord that is being inserted or updatedqcurrentRecord within the psp_in_message table (pulled from the Perspectium Mesh). Use the message's key value to determine its source.ignoreCan assign a value of true in order to stop the execution of the subscribe

↑ Go to top of page

After subscribe scripts

These scripts are also created with server-side JavaScript and will execute right after a record from a sharing instance is synced on the subscribing instance. Within your after subscribe script, you have access to the following variables:

Variable

Description

currentRecord that was inserted, updated or deleted, the destination record

↑ Go to top of page

Create before and after subscribe scripts

Here's how to create these scripts:

Go to Perspectium DataSync Express > DataSync Express > Subscribe.
In the resulting page, find and select the subscribe record that you want to configure.
In the resulting subscribe record, click the Filter and Enrichment tab. You should see the Before subscribe script and After subscribe script fields.
Use the available fields to enter your desired scripts. See below for some examples. Once you're done, click Update

Image Removed

↑ Go to top of page