Hi Philip,
We would like to automatically log-out a user at the end of a process flow that is initiated by the same user
That is indeed not possible as we currently don't have such process flow action. Feel free to create an idea for this
If it is not possible to do so automatically, is there an option to switch accounts within the application, without closing and opening the application.
Not in the usual way. The true logged-in user cannot be switched as the application is opened and tailored to the user that is logged in. You could build a way of logging in inside your application. This does require some clever coding and modelling, but some customers are already doing it like this.
This is limited as it is not possible to have different roles and rights between users as the true logged-in user doesn't change - just the operator.
We have thought about alternative options as well such as a windows batch (.bat) file that closes and opens the application automatically. Is it possible to trigger such a script within the TW application?
In the Windows GUI we do allow Windows command tasks to be executed. This can call an external program or batch file like you mentioned. The docs tells some more about it: Tasks | Thinkwise Documentation (thinkwisesoftware.com)
Hi Philip,
I was curious to try this and it works pretty well:
- Make a task in the SF that uses ‘Windows Command‘ as the logic type and assign it to a table or menu
- Give it an object name with brackets (e.g. “.bat_file_location”]
- Give it a parameter with the same name as the object name, but without the brackets (e.d. “bat_file_location”)
- Give the parameter a default value with the location of the .bat file (e.g. “c:\temp\file.bat”), maybe use an expression default if the path is very long or calculated
- put the following inf the bat file:
- taskkill /im tsf_dotnet.exe
- start \\...\Windows\TSF_CS.exe "\\...\ini\name.ini"
this will kill all instances of the GUI, you might be able to tweak some things in taskkill
You can also directly call cmd.exe with some parameters, I didn’t try that though
Thanks for the very helpful replies!
I was able to create such a task, I’ll only have to add it to the process flows.
I ended up using the following batch file:
taskkill /im tsf_dotnet.exe
sleep 1
@ECHO OFF
SETLOCAL
start "" "C:\Thinkwise GUI\TSF_CS_run_dev.lnk"
GOTO :EOF