Step | Description | |
1 | Determine whether the latch is open or closed for the changed object. Invoke the pub.synchronization.latch:isLatchClosed service to locate a row in the cross‑reference table for the changed object. Pass the isLatchClosed service the following inputs that identify the object: | |
In this input variable... | Specify... | |
appId | The identification of the application (e.g., Billing system). | |
objectId | The object type (e.g., Account). | |
canonicalKey | The canonical ID. | |
The isLatchClosed service uses the isLatchClosed field from the matching row to determine whether the latch is open or closed. If the isLatchClosed field is ‘false’, the latch is open, and the isLatchClosed service returns ‘false’ in the isLatchClosed output variable. If the isLatchClosed field is ‘true’, the latch is closed, and the service returns ‘true’. For more information about the isLatchClosed service, see
pub.synchronization.latch:isLatchClosed.. | ||
2 | Split logic based on whether the latch is open or closed. Use a BRANCH flow step to split the logic. Set the Switch property of the BRANCH to isLatchClosed, to indicate that you want to split logic based on the value of the isLatchClosed pipeline variable. | |
3 | Build a sequence of steps to execute when the latch is open. Because the Label property for the SEQUENCE flow step is set to false, this sequence of operations is executed when the isLatchClosed variable is false, meaning the latch is open. When the latch is open, the target resource has not yet made the equivalent data change. This sequence of steps builds and sends a native document that the target resource uses to make the equivalent change. | |
4 | Close the latch. When the latch is open, close the latch before sending the native document to the target resource. For n-way synchronizations because a target is also a source, when the resource receives and makes the equivalent data change, the resource then sends notification of a data change. By closing the latch before sending the native document to the target resource, you remove any chance that Integration Server will receive and act on a notification document being sent by the resource. To close the latch, invoke the pub.synchronization.latch:closeLatch service. Pass the closeLatch service the same input variables that were passed to the pub.sychronization.latch:isLatchClosed service in step 1 above. For more information about the closeLatch service, see the
pub.synchronization.latch:closeLatch.. | |
5 | Build a sequence of steps to execute when the latch is closed. Because the Label property for the SEQUENCE flow step is set to true, this sequence of steps is executed when the isLatchClosed variable is true, meaning the latch is closed. When the latch is closed, the resource has already made the equivalent data change. As a result, the update service does not need to build or send a native document to the target resource. | |
6 | Re-open the latch. Re-open the latch to reset the latch for future data changes. To re-open the latch, invoke the pub.synchronization.latch:openLatch service. Pass the openLatch service the same input variables that were passed to the pub.sychronization.latch:isLatchClosed service in step 1 above. For more information about the openLatch service, see the
pub.synchronization.latch:openLatch.. |