Long Lasting Process - seek for advice

Dear All,

I am working on a process for monitoring the user’s behavior on screen. If the user open an application and the application is kept running, I want to log a message into a log file. And, if the application is not running anymore, log another message to indicate that.

  1. I created an infinity loop and using “Find Element” to determine if the application is open and running and write the log accordingly. If this is the best approach to achieve this? Any other better approach to do this? I was thinking using “Trigger” to determine if the “Process” start but this only can help to determine if an application is started but not “is running”.

  2. As I need the process to run when windows is logged in and the “user” is not supposed to allow to kill this process. How can we disallow the user to stop the uipath process and ensure this process is kept running even it was stopped by accident or kill because of insufficient of memory?

Thank You.

Hi

Welcome back to UiPath forum

For this we can try getting the processes running in background with GET PROCESS activity

You got an example here on how to use it

And for this

Did we try using BLOCK USER INPUT activity

Cheers @bennycc_chan

Thank You so much @Palaniyappan. I will give a try on the “Get approach”.

About using “Block User Input”, if I am correct, it can block user’s input when the automation is running. I am thinking, if this is possible to prevent user to touch/stop “UiPath” so that that process can kept alive (at least, cannot stop/restart by user. The perfect scenario would be :

  1. this monitoring process starts right away after window boost up or user logged in
  2. user cannot stop the UIPath or this monitoring process
  3. the process will be started automatically if it is stopped by any reason.