2
1
0

We have a "trigger" rules to start the sync that is working but once the initial sync is established... subsequent syncs will happen regardless of the condition... we only want sync (after initial sync) only to happen if certain condition is met... how can we do that?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Samip, 


      In the incoming script of your destination side, you can have some logic right after the "if (firstSync)" block, so that it "returns" aka does nothing if a condition isn't met, for example, if your condition was that the priority must be "1-High" you can have something like:


      if (replica.priority != "1-High") {
      	return;
      }


      And after this, you can have all your normal sync rules, so if the condition is met, it goes through your normal sync rules, but if it isn't, it does nothing.


      Let me know if this is a solution for you. 


      Thanks,

      André

      1. Samip K Banker

        André Leroy-Beaulieu Castro :

        I have exact same thing but it is still not working...let me try agian... 

        if (replica.customKeys."Status" != "Approved")
        {
        	return
        }
        else
        {
        	// code to perform the sync
        }
        
        
        

        ~Samip

      2. user-3fd1a
        • Make sure that the issue is empty, such that Exalate knows that nothing needs to be applied.
        • If in doubt what the value is, check the 'remote issues tab' on the issue under sync
        • If still in doubt, add a throw statement in the else section of the code
          Check following snippet for the throw details
          https://stash.idalko.com/snippets/21ad469b5a2e4ff0a42d628c79245758



      CommentAdd your comment...