cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate Unity Client

Jed_Kaplowitz
Star Contributor
Star Contributor

I am running an external program that starts a Unity Client via a URL string (with a document ID).
The Unity Client comes up and displays the document.  That works pretty well.  
The title of the Unity Client is "WorkFlow Viewer" when it displays the document.

Then the user has the option of a few workflow tasks.

Is there a way to have one of those Ad-Hock Tasks actually terminate the Unity Client?
Like run a few actions, and then close the unity client is what I want to do.

I was thinking maybe run a unity script that searches for the Unity Client Process (like for "WorkFlow Viewer") and terminates it.
Do you think this will work?

Is there another way to do this that may be better?

Thanks,

Jed K 

2 REPLIES 2

Tyler_Sorber
Star Collaborator
Star Collaborator

Hi Jed

 

This type of functionality can get somewhat tricky; especially doing so within OnBase.

I would say that terminating the Client Process from a Unity Script would not be the route you would want to travel, as the Application object from the Script is shared with the Client.  Closing this session from under the Unity Script can cause clean up issues and possibly cause the Session to be abandoned since it was not disconnected properly. 

My suggestion would be to have some sort of button through the UI of the External Application that would find the Client Process and safely close the process, making sure any used resources are disposed of and not left behind.  This would essentially emulate performing a Right-Click on the Client in the Task Bar, and selecting Exit OnBase.

Jed_Kaplowitz
Star Contributor
Star Contributor

OK, thanks for your answer.