Show form to confirm successful workflow and give statistics
I used the OpenRPA Snippets' SimpleForm to generate a form which basically only has a title, a header and some text saying that the process successfully finished. I would like to add the following information to that message:
- date & time the workflow started
- date & time until the success confirmation form started displaying
- timespan in hours and minutes between the the two
Can I capture these times in two variables somehow at the beginning and end of the workflow? The time difference should be obtainable with MyEndTimeVariable - MyStartTimeVariable, correct?
And finally, how do I make the variable values and their difference part of the confirmation text in my form?
Current code in Form Desinger:
<form> <title>My Desgined Workflow</title> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Eo_circle_green_checkmark.svg/180px-Eo_circle_green_checkmark.svg.png" /> <heading>The designed workflow completed. _____________________________________________________________________________________ </heading> <action name='Closing' content='FANTASTIC!' icon='check' validates='false' ClosesDialog='true' /> </form>
Allan Zimmermann last edited by
This should do the trick (you need openrpa 1.4.17 to import this workflow )
Thank you so much Allan! Very interesting and helpful.
Especially, how you displayed the variable on the form was quite informative. I really appreciate it!
Finally, I would also like to record the time the process started (to check if Windows task scheduler executed correctly) and when it ended. How can I write the current date and time to a variable? Is there some kind of Now() function which I can call?
Allan Zimmermann last edited by
I'm a bit confused... So, I can call a workflow from a command line manually but if Windows Task Scheduler is calling the command line, it's a problem? I had already a few runs of my robot over night and it went through without any problems.
Only it seems my confirmation dialog causes the OpenRPA workflow designer window to open which I would like to suppress somehow. (I'm still using v1.3.61 - would 1.4.17 be better here and can I import my xaml workflow file into 1.4.17?)
Allan Zimmermann last edited by Allan Zimmermann
It's easier to just say "no" than to explain the difference nuances.
Task Scheduler runs as Local System, and by default a task will run as local system. Local System does not have the permissions I mentioned.
But you can, per task, tell it to run as the interactive user ( the user at the console ) and then it runs as who ever is logged in. This will work as long as the computer is not locked or has a screensaver running.
If OpenRPA is already running and you run openrpa.exe with parameters to run a workflow it will connect to the existing OpenRPA client and inject those parameters, so you don't have multiple OpenRPA clients running. It uses named pipes for this, and those are setup to only allow the same user to connect to the pipe, so running openrpa.exe from a task as local system will NOT be able to tell the robot running as a windows user, to run a workflow. ( we can fix this, by running a PowerShell script instead, and using "Invoke-RemoteOpenRPA" ( need to call Set-CurrentUser to login to openflow first since Local System will not have a documents\openrpa\settings.json file )
All of this just seems like a lot of work, when you could simply start a NodeRED instance and do it all from there using the inject node or cron node.
@allan-zimmermann Ok, wow! Thank you for the insight. I agree, quite complex and cumbersome but due to IT-policy, I would probably need to go down that alley. Currently, I have no issues running my process over night, as the currently logged in user but seems only a question of when I will reach the limitations of this method...