I'm integrating Jira with ServiceNow. I wrote a REST plugin that Snow calls to create or update Jira issues. On the Jira side, I have ScriptRunner listeners that react to various events to capture creation and changes to Jira issues and sends the information to Snow.
The problem is that when the REST module makes changes to the Jira issue, it triggers update and other events that cause the listeners to send the same changes back to Snow.
I've set a flag to indicate when an update has been made by the REST module so that the listener can ignore any updates made by REST. Unfortunately, the updates can trigger multiple events but only the first one is ignored using the flag.
I'm wondering if there is any way the REST module can suppress the firing of the events or if anyone can provide any other suggestions.