Feature Request - WAIT function

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Feature Request - WAIT function

Post by Gabbitas »

This is a feature request to add a WAIT function to use in business rules / processes.

What it would do is cause a rule to wait for a specified time before executing. For example WAIT (10) would wait ten seconds before executing the next rule in a process.

The reason I request this is that I have a process that creates a 'tracking record' when a user logs into the mobile version. The process that creates the tracking record is executed after the visual perspective loads but it fires the rule before the current location has been recorded in the LoggedInSystemUser object. This means that the tracking record is created with the previous login's location.
Another example of its use would be when a document or other item has been sent outside the system for processing by another application such as a PDF command line tool.

I have managed to work around my problem with the current location and tracking record by running a few nonsense queries before it actually creates the tracking record but this just seems a bit clunky! I also had a message pop up for the user to click (this stalled the process but is not really suitable in my circumstance)
If anyone has any better ideas then I would love to hear from you. If this feature could be added then even better!

Thank
hpl123
Posts: 2600
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Feature Request - WAIT function

Post by hpl123 »

Gabbitas wrote:This is a feature request to add a WAIT function to use in business rules / processes.

What it would do is cause a rule to wait for a specified time before executing. For example WAIT (10) would wait ten seconds before executing the next rule in a process.

The reason I request this is that I have a process that creates a 'tracking record' when a user logs into the mobile version. The process that creates the tracking record is executed after the visual perspective loads but it fires the rule before the current location has been recorded in the LoggedInSystemUser object. This means that the tracking record is created with the previous login's location.
Another example of its use would be when a document or other item has been sent outside the system for processing by another application such as a PDF command line tool.

I have managed to work around my problem with the current location and tracking record by running a few nonsense queries before it actually creates the tracking record but this just seems a bit clunky! I also had a message pop up for the user to click (this stalled the process but is not really suitable in my circumstance)
If anyone has any better ideas then I would love to hear from you. If this feature could be added then even better!

Thank
1+
Henrik (V8 Developer Ed. - Windows)
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Can't you accomplish this by putting the rules in the desired sequence in a process rather than just a rule on the BO?
Tom - V8.8 build 3137 - MySql / PostGres
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Post by Gabbitas »

Hi Tom,

Problem I have is that I don't have any control over the the way (or when) the current location is added into the LoggedInSystemUser. The system handles this process automatically at mobile login and my tracking record process, that I do have control over, is executed at login too.

Thanks
hpl123
Posts: 2600
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Workaround

Post by hpl123 »

Hi Gabbitas,
Haven´t used the location functionality yet so don´t know fully how it works but would it be possible to use business rules only for the record?

If attribute "BO.Location" is the attribute where the location is populated, add a rule to the BO checking if BO.Location was changed:
If BO.Location WAS CHANGED Then
Create LocationRecord
Henrik (V8 Developer Ed. - Windows)
lineamovil
Posts: 201
Joined: Tue Jul 27, 2010 2:17 am
Location: Mexico

Post by lineamovil »

1+

I have been trying to trick my app by using "DISPLAY MESSAGE ASYNCH DELAY 15" but it stops the rules after this.

(I Display URL (file.php) where this php file is creating another file in the local drive. I have to wait some 5 to 10 seconds until the file is created, then imported into a fiedl. Then printed.

The only thing that works is displaying questions to the user, so it will take more time to the user to respond and then give time to the file to import.
LineaMovil // Carlos Castillo
AwareIM Version 8.6
Windows Server 2021
MySQL Database 8.4
MEXICO
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

I have not used location feature yet either, but I'm wondering if you can have a process that find the LoggedInSystemUser, then UPDATE SystemUser.

Wondering if this would update the location at the proper sequence in a process.
Tom - V8.8 build 3137 - MySql / PostGres
hpl123
Posts: 2600
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Workaround

Post by hpl123 »

Thinking about how this can be achieved. I THINK AutoIt can be used as an timer which would basically work as an WAIT function. The idea is to create an AutoIT script exe which Aware IM could execute via the EXECUTE PROGRAM action. The EXECUTE PROGRAM action waits for the program to execute and if the program basically only consists of a delay timer of e.g. 10 seconds, this should in my head work as a WAIT function.

I haven´t tested it yet so don´t know for sure but will in the future and if anyone tests this please share your results. Here is info on the AutoIt "Sleep" function which would be used (AutoIt is very simple to use by the way).
https://www.autoitscript.com/autoit3/do ... /Sleep.htm
Henrik (V8 Developer Ed. - Windows)
Post Reply