File Monitor Trigger

Discuss RoboTask here
Post Reply
squaremonkey
Posts: 4
Joined: Thu Feb 22, 2007 7:52 am
Location: United States
Contact:

File Monitor Trigger

Post by squaremonkey »

We currently use RoboTask to perform a series of updates to various Pervasive SQL database tables and use File Monitor, monitoring the Order Master Table, as the Trigger.
The problem is that the Order Master Table is accessed frequently by the ERP System, launching the RoboTasks even though the changes to the Order Master Table may not have been relevant to the tasks.
Is there a way to modify the File Monitor so that it will launch the RoboTasks only if changes to a specific field reference within the table are made? For example: if OrderMaster.OrdNum_10 like '5%'
Any assistance would be greatly appreciated.
 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

File Monitor Trigger

Post by Oleg »

What does mean "if OrderMaster.OrdNum_10 like '5%'"? Maybe, you mean some SQL query. Describe in more detail please. Probably I will can help you.
I'm afraid that "File monitor" is not fit for monitoring of database changes.
squaremonkey
Posts: 4
Joined: Thu Feb 22, 2007 7:52 am
Location: United States
Contact:

File Monitor Trigger

Post by squaremonkey »

The Work Order Table contains a field named OrdNum_10 where it lists the Order Number, an 8 digit numeric field. The first digit of the OrdNum_10 field indicates the type of order it is. For example, order numbers beginning with 2 are purchase orders, numbers beginning with 7 are customer orders and orders beginning with 5 are internal work orders.
What I would like to be able to do is trigger the RoboTasks only when the changes to the OrdNum_10 field are numbers beginning with 5.
 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

File Monitor Trigger

Post by Oleg »

Do you want to detect changes in specified row (i.e. only in one value) or you want to scan all rows by condition OrdNum_10 like '5%' and detect the changes in any row?
How many rows (approx) does the query return:
select OrdNum_10 from OrderMaster where OrderMaster.OrdNum_10 like '5%' ?
squaremonkey
Posts: 4
Joined: Thu Feb 22, 2007 7:52 am
Location: United States
Contact:

File Monitor Trigger

Post by squaremonkey »

I want to scan all rows by the condition OrdNum_10 like '5%' to detect any changes.
The query select OrdNum_10 from OrderMaster where OrderMaster.OrdNum_10 like '5%' will return approx. 1000 rows.
lonnie16
Posts: 20
Joined: Thu Sep 09, 2004 9:40 am
Location: United States
Contact:

File Monitor Trigger

Post by lonnie16 »

And this may help the detection. ( maybe )
Is the target machine loafing most of the time?  If so, output the query to a thousand line text file, and call it the master.  Then every five minutes, pull and build a new text file from a query at that moment.  You see where I'm going...  Comparing text files is a piece of cake for robotask.  ( and the cpu meter will periodically blip )
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

File Monitor Trigger

Post by Oleg »

See this example, please. This task retrieve all values from OrdNum_10 field and saves in variable Current_Value. Next RoboTask compares variables Current_Value and Old_Value. If values are different then raises the message and saves current value into Old_Value.
This task is starting by cyclic trigger every 60 sec.
You can put some another steps (or start another task) instead of message.
squaremonkey
Posts: 4
Joined: Thu Feb 22, 2007 7:52 am
Location: United States
Contact:

File Monitor Trigger

Post by squaremonkey »

Yes, I understand the approach. The example was very helpful.
Thank you for the help and for such a fine product.
Post Reply