Skip to main content

Trigger Activities

Triggers define actions to be executed at any instance of the configured events. IntelliBuddies supports two ways of defining triggers.

This tutorial section concentrates on the second part of Triggers using Activities. IntelliBuddies support the following three types of trigger activities.

1. File System Trigger

Create a File System Trigger activity to monitor various file actions such as creation, modification, deletion, or renaming.

Here is an example process that monitors the My Documents folder and catches all file events. This is done by checking the events using TriggerEventArgs and specific FSEventArgs parameters within the context of the Trigger Context activity. The trigger event is checked with switch and the change file information is displayed using write line activities. It exits the trigger using Break Trigger after it triggers for five times by checking the counter.

2. Hot Key Trigger

Use this Activity to check the key(s) pressing, and on pressing the appropriate key(s), the Trigger Context executes the sequence of activities in its Body.

Here is an example process that monitors the key(s) pressing (Alt-B, Shift-W, and Ctrl-End). In the body section of Trigger Context Activity, the events are checked with the help of TriggerEventArgs and specific HotkeyEventArgs parameters. Checks the event using switch and displays the key press information using write line activities. It exits the trigger when user presses the Ctrl(key modifier)-End(key) using Break Trigger activity.

3. Process Trigger

Use this Activity to monitor whether a particular process is opened or closed in the Scope (Machine and User) chosen. The Trigger Context executes the sequence of activities in its Body by checking the type.

Here is an example process that monitors the opening and closing of notepad.exe application. In the body section of Trigger Context Activity, the events are checked with the help of TriggerEventArgs and specific HotkeyEventArgs parameters. Checks the event change type using switch and displays opening and closing of notepad application information using write line activities.

Come, let's create all the above three types of triggers process in Process Designer:

Step#1

Launch and create a new process in Process Designer

  • Launch Process Designer from the Windows Start menu located under IntelliBuddies Enterprise

Step#2

Create New Process

  • Click on New Process and fill in the new process details

Step#3

  • In Activity panel search for Trigger Context, drag and drop activity to main panel.

Step#4

info

Set the Filter property with the file type. For example: Setting the file type to ".txt" triggers only text file action events.

Step#5

note
  • In the File System Trigger, a counter variable is added to keep the count of trigger and exit after the fifth execution.
  • In Hot Key Trigger Break Trigger Context is added for keypress Ctrl-End to exit from the trigger

Step#6

  • In Activity panel search and drag and drop Switch Case activity one each to check three types of trigger change type in If Else block.

  • Check ChangeType in Switch expression and add a case for each action type File System(Created, Deleted, Changed, and Renamed), Hot Key(check for keys mentioned in trigger section, which are Alt-B, Shift-W, Ctrl-End), Process(Start, End)

Step#7

Save the process

  • From the Design tab ribbon, click on Save

Step#8

Run the process

  • From the Design tab ribbon, click on Run

Step#9

Ensure the process executes and waits for appropriate trigger actions

  • File System: Captures file action in the configured folder (My Documents) and displays the appropriate message as per the trigger.

  • Hot Key: Captures Hotkey pressed and displays appropriate message.

  • Process Trigger: Captures process open and close and displays an appropriate message.

Download Example (C#)