Choosing Flow Designer for dynamic shares makes use of ServiceNow’s Flow Designer to create a flow that will send records out of your ServiceNow instance as they are created and/or updated.

Because business rules may not always trigger when records are created and/or updated (due to changes done utilizing a script where setWorkflow is set to false to disable running business rules), this option is an alternative to ensure these changes are captured and shared out of your instance. 

For more information, see ServiceNow Flow Designer and setWorkflow.

(info) NOTE:

  • Because of how flows and business rules are created in ServiceNow, dynamic shares created with Flow Designer cannot be changed to a dynamic share created with a business rule (and vice versa).  You will have to delete the dynamic share and create a new one if you want to change the dynamic share from one approach to the other.
  • Also because of the many tables used by ServiceNow to build the Flow Designer engine, records will be inserted/updated in the following tables when a flow is created/updated and the first time each flow is triggered:

sys_hub_action_input
sys_hub_action_output
sys_hub_action_type_snapshot
sys_hub_flow
sys_hub_flow_block
sys_hub_flow_input
sys_hub_flow_snapshot
sys_hub_step_ext_input
sys_hub_step_ext_output
sys_documentation

(info) NOTE: To ensure that the tables listed only grow to reasonable size, use ServiceNow's table rotation on the tables listed above. See ServiceNow Table Rotation on how to apply table rotation in your ServiceNow instance.

This will result in text_index events being created for these tables for updates by Flow Designer. Note that if you are running flows in a domain-separated instance with versions of New York or earlier, it may create these records in each domain. This issue has been resolved as of Orlando. The approximate updates are as follows:

ActionNumber of Inserts/Updates
Dynamic share creates flows for insert and update28
Insert flow is triggered for the first time9
Update flow is triggered for the first time12
Delete a dynamic share1 (sys_metadata_delete)


(info) NOTE: Once the dynamic share is created using Flow Designer, every field, except Active, will be read-only.  You can only use the Active field to enable or disable the flow created with this dynamic share to ensure replication. 


Prerequisites


(warning) You will need to install DataSync for ServiceNow and run the Perspectium Finish Install scripts.

(warning) You will need to set your initial Perspectium & Replicator properties.

(warning) You will also need to create a shared queue.

(warning) (Optional) You have user access to Flow Designer in your ServiceNow instance. This will allow you to troubleshoot any issues creating flows but is not required as flows can be created as long as you have access to the Perspectium application and dynamic shares.

Setup a dynamic share using Flow


To dynamic share data with the Using Flow option, follow these steps:

Navigate to Dynamic

In ServiceNow's left side navigation window, navigate to Perspectium > Replicator > Dynamic Share or simply type and then click on Dynamic Share.

Click New

At the top of the form next to Replicator Configurations, click the New button. 

Choose Dynamic Share Type

Select Flow Designer and click the Submit button.

Type a dynamic share name

In the Name field, type any name for your dynamic share.

Choose a table to dynamic share

Click the dropdown next to Table. Then, search for and choose the table or database view whose data you want to dynamic share out of your ServiceNow instance.

(info) NOTE: Flows can be run against any table or database view like business rules created globally.   However, in ServiceNow's Orlando release, SLA Task has its own application trigger. You cannot create a dynamic share using SLA Task Application Trigger. You can still select task_sla in the dynamic share's table field. The flow designer record for SLA Task will not be accessible, however, the dynamic share will still apply. 

Make your dynamic share active

Check the Active box to activate your dynamic share and start sharing out record data dynamically.

Choose an encryption method

Choose a method to encrypt the data that will be shared out from the Encryption Method dropdown. Cipher options include:

Encryption MethodDynamic shared data will...
TripleDESbe encrypted with Triple DES.
AES128

be encrypted with AES-128.

AES256

be encrypted with AES-256.

(info) NOTE: To ensure AES-256 encryption for your data, you will need to create an encryption and decryption key with at least 32 characters in the PSP Properties module.

Base64 Encode Onlyhave Base64 encoding only.
Unencryptednot be encrypted.

Choose your trigger conditions

Scroll down to the Trigger Conditions tab and check any or all of the following boxes:

ActionRecord data will be shared out of your ServiceNow instance when...
Createnew records are created.
Updaterecord data is changed.

(info) NOTE: Flow does not support delete. This is a platform limitation where Flow Designer only works on inserts and updates. To capture delete actions, you will need to create a dynamic share using business rule for delete, and have a separate dynamic share using flow for insert and/or update. If you choose to create a dynamic share for deletes, you may want to enable the Use Audit Delete Listener feature. 

Choose a target queue

Click the Additional Settings tab and then click the  icon next to the Target queue field. In the Queues popup, choose the shared queue that you want to dynamic share your record data to.

Select other options

Additionally, dynamic share provides other options that can enhance sharing your record. Share base table records onlyinteractive only, and much more.

(info) NOTEScheduled sync up can be enabled with flow. However, this option is primarily used for capturing dynamic record updates and creates that may have been missed due to business rules being bypassed programmatically (e.g., via setWorkflow('false');) or automation that does not trigger business rules, which flow handles.   

Click Submit

Click the Submit button at the bottom of the form to save the configurations for your dynamic share.

(warning) WARNING: Editing the flow in the Flow Designer will not reflect on the dynamic share. Doing otherwise may cause some of the records to not replicate correctly. 

Calling the Flow Designer as a Sub-Flow may also cause some of the records to not replicate correctly.

(info) NOTE

  • Flows can be created in the global application space like business rules.
  • Flows performance is like running business rules async in the background, so the performance is similar to that which is better than standard business rules that block when the business rule is set to run before or after.  

Known Issues

  • Group share will only create dynamic share with a business rule approach, choosing flow is not yet an option for group share. 
  • The information message states a delete action for the flow approach. Flow designer DOES NOT support deletes.