What Is Enable Local Trigger

Hi all,

What is the Enable Local Trigger activity? The docs don’t give very much detail, nothing more than what IntelliSense offers. But using this doesn’t seem to let the trigger fire. In fact, it appears to do nothing.

Sample setup:

  1. Create a new project with the Sequence template.
  2. Create a new Sequence workflow called ShowMessageBoxTrigger.
    1. Add a Trigger Scope activity
    2. In the Triggers section, add a Process Start Trigger. Set the Process Name to “notepad.exe”.
    3. In the Actions section, add a Message Box activity with the text “Notepad was started!”
  3. In Main, add an Enable Local Trigger activity. Select the ShowMessageBoxTrigger trigger.
  4. Add a Start Process activity with the path set to “notepad.exe”
  5. Execute the application.

With this setup, notepad will launch but no message box will be displayed.

So what is this activity for and what does it do exactly? By the sound of it, it should have the selected trigger start listening/watching for the trigger(s) it’s configured to act upon, but to do so on a background thread so as not to block the sequence it’s in. But this doesn’t appear to be the case.

I added a 5 second delay at the end to make sure it wasn’t a race condition - the application ends before the trigger can properly execute - but this delay had no effect.

1 Like

I was able to find my answer. It was not available in the video.

The short version is, triggers have a state and they can be enabled or disabled. Disabled triggers will not run. The Enable Local Trigger activity is designed to enable a trigger.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.