Which Event was trigger ?

Discuss RoboTask here
Post Reply
igimax
Posts: 12
Joined: Wed Jul 07, 2010 3:39 pm
Location: Iran
Contact:

Which Event was trigger ?

Post by igimax »

Hi.  I wonder! how we can know which event was trigger at "Triggering Events" tab?. I'm writing a task and its job are to dial two network connections base on some conditions and after one of them get disconnected. Therefor, I have 2 events for monitoring their disconnections.! Now, I need to know, which event was trigger so i can log its time and connection name at a file?. In fact, sometimes we may need more than 2 or 3 "Trigger Events" for a task and it is very good idea to have some variables that show us the name of Trigger and other details about it! (if such thing there are not exists yet!)Thanks for your great programBest RegardsIgImAx
Last edited by igimax on Wed Jul 07, 2010 8:05 pm, edited 1 time in total.
igimax
Posts: 12
Joined: Wed Jul 07, 2010 3:39 pm
Location: Iran
Contact:

Which Event was trigger ?

Post by igimax »



Hi .  After long deep search!! at RT guide I found these methods and Properties:RoboTaskApp.EventInfo(ByVal TaskNum as Long, ByVal
EventNum as Long, EventID as String, Enabled as Boolean)RoboTaskApp.EventParameters(ByVal TaskNum as Long, ByVal
EventNum as Long)RoboTask.EventsCount(ByVal TaskNum as
Long). Then, I write a basic program for them, but all of them return some infoz about current Event settings!! none of them show which one is triggered! . Is there anyway to find which one is trigger or not? (I can use each "Trigger Event" at separate task then set a variable at each task by the name of Trigger name of that task and then it call the main task, but this is not the good way!! but it seems the only way for now!!!)Good Luck IgImAx
Oleg
Site Admin
Posts: 3105
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Which Event was trigger ?

Post by Oleg »

You are correct, if you attach several events to the task you can't say what event starts the task.
But if this is critical you may do the simple trick:

Suppose you have the "main task" that do necessary actions. This task must be without events and it must be started from another task.
Also create several task with one trigger only. All these tasks are similar:

task1 whith trigger1

this task have only one step:
Start "Main Task" with parameter Trigger = trigger1

task2 whith trigger2

this task have only one step:
Start "Main Task" with parameter Trigger = trigger2

and etc.

Of course the main task should process the variable "Trigger"

Thus, you can say what trigger has started "Main Task".
igimax
Posts: 12
Joined: Wed Jul 07, 2010 3:39 pm
Location: Iran
Contact:

Which Event was trigger ?

Post by igimax »

Hi Oleg. 
Thanks for reply, but I did not get "Email Notification for Replies!" anyway, Is it possible to add a Method for next RT version, that can show us the name of event that trigger a task?! Good
Luck IgImAx
Oleg
Site Admin
Posts: 3105
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Which Event was trigger ?

Post by Oleg »

What is the problem? You can add "Send email" action to the task. Also add information about fired trigger to the message body.
igimax
Posts: 12
Joined: Wed Jul 07, 2010 3:39 pm
Location: Iran
Contact:

Which Event was trigger ?

Post by igimax »

Hi Oleg.  Oh! no! When I said "Email Notification for Replies!", I mean, when you reply to my post at forum, I did not get any email notification from Forum! but now! i check my gmail account and I found that they go to my Spam folder! the problem is solved!. Still! It will be very handy if there is a Method for showing us which Event was trigger a task? (at multi triggers task)...Good
Luck IgImAx
Post Reply