How to Trigger syndication when certain fields of a Record are changed WITHOUT creating any Time Stamps
Their might be a business requirement where you are required to trigger syndication of a record when certain fields of that record are changed.
Now this objective can be achieved either by creating Time Stamps or by creating validations.
Validations is a very powerfull tool in Data manager and can be effectively used to achieve many business objectives. in the below process we will be triggering the record syndication only by creating validations, we will not create any time stamp fields.
Why create Time Stamps when we can achieve the same objective by creating Validations.
In our example we will be working on the Vendor repository in which we will be tracking the changes to the below three fields and trigger a syndication only when any/all of these three fields are changed or when a new record is added.
1. Account group
Here i am not going to explain the creation of Remote system and Port .I am assuming that the required Remote system, Port and Map are already created.
Creating Validations and Validation Groups
1. Login to the Data Manager.
2. Go to Records–> Validations–> Edit Validation Groups or in the Validations Tab Right click and select Edit validation Groups from the context menu.
3. Create a validation group called Workflow ALL.
4. Now we will create Validations for the three fields whose changes we want to track .We also want to trigger syndication when a new record is created so we will create one more validation for the new record and for each validation created we will assign the Validation group called “Workflow ALL” which we created earlier.
5. Select the validations tab as the active tab and create the validation. Right click under the validations grid and select create validations from context menu and assign the Group as Workflow ALL as shown.
Below are the validation expressions which are built to achive the desired result.
The above expressions compares the original record with the checked out record and the validation will fail in case the value of the checked out record is changed.
This expression will fail when the original value of the record that already exists in repository is Null and the new value(value of the checked out record)of that record is not Null.
This expression will check if the record is a Normal checkout or a Merge checkout and it fails when the record is a new checkout.
we have to write similar expressions for Name1 and Country. Remember to add the validation group”Workflow all” for all these created validations
Creating a Workflow:
1. In Data manager select current table as Workflow
2. Right click in the records pane and create a workflow called syndication as show and give the details of the workflow in the record details tab as below
Give the Name, Code, Description. Select the Trigger Actions=Record Update and Record Add, Active=Yes and Autolaunch=Immediate.
3. Double click on the Workflow to launch Microsoft Visio and desing the workflow as shown.
Start step: checks out the record.
Branch step:We will assign the Validation group “Workflow ALL” in validations field as shown above and select the Workflow all option as Stop (which means when the validation result is true for all the validations for a record then that record will go to Stop and get checked in) and set the [Default] as Syndicate (which means when any of the validations fail the record will go to syndicate step and get syndicated to the port specified in the Syndicate step).
4. In the syndicator step select the outbound port to which you want to syndicate the data.
Now each time a new record is created or any of the existing records account group, Name1 or country fields are changed the validations in branch step will fail and the records will be syndicated.