Stop processing an inbound action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2016 02:58 PM
I have created an inbound action that is inside scope and I need it to stop processing after it runs. I have added "event.state="stop_processing";" and that normally works in global but it does not appear to be working in scope.
I checked the logs and found this:
org.mozilla.javascript.EcmaError: "event" is not defined.
Caused by error in Inbound Email Actions: 'Create HSC Incident' at line 30
27: }
28:
29: current.insert();
==> 30: event.state="stop_processing";
Has anybody seen an issue with stop processing in scope or know of another way to stop processing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 08:20 AM
Why don't you just check the "Stop processing" box for the Inbound Email Action? Wouldn't that do what you want?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2018 01:40 AM
There are several times when the "Stop processing" box is not appropriate. My use case is
inbound action run order 50 checks if the email of type forward contains a valid watermark in the email body. If it does, it updates the existing incident and stops processing
inbound action run order 100 processes email of type forward and creates a new incident
In this case I set event.state='stop_processing'; in the first script only if the watermark is found and updated. If I use the "Stop processing" box then the second script will never run.
I know that I could just create one big script that both checks if the issue exists and if not creates a new one, but splitting this into two scripts makes the code cleaner.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 08:25 AM
Agree with Reed. The Stop Processing attribute was introduced several releases ago and is the "new" way of stopping the processing of further inbound actions. More details can be found on this article:
Create an inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2020 05:17 PM
I had the same issue, and it's because my inbound action script was in scoped application. When I create the inbound action again in Global, state.event = 'stop_processing' worked as expected.
Note: confirmed in Madrid version, not sure if this is fixed in New York.