06-18-2019 04:36 AM
It should repeatedly check every 3 sec for some UI changes and when conidition is met it should update an infobox.
Even when the workflow window is closed (via IG.closeWebBrowser())
Does anyone know if the GSCM workflow logic has been changed in V16.5 (maybe some kind of garbage collection?)?
Is there a way to overcome this?
For now as a workaround the IG.closeWebBrowser()-command is disabled when using client V16.5, but it would be difficult to also alsk the end users to not manually close that window.
Thanks for any help,
Solved! Go to Solution.
06-18-2019 04:47 AM
it really surprises me it was working closing the window, the JS should be defined only within the browser context. How did you manaage to show the notification with the window closed? Wouldn't be enough to use bringToFront and bringToBack methods?
06-18-2019 06:49 AM
thanks for your quick reply.
I've tried to use the SmartClient.bringToBack() method but it only sends the main form to the back - the start window (with the script) is still visible - also in the taskbar.
Please see the following screenshot:
To be honest I am also wondering why this worked in the previous version.
I am trying to debug the code from a colleague - I am pretty new to the whole GMSC world :-)
06-18-2019 08:58 AM
I'm not quite sure I understand your configuration: do you have more than one window opened? You may try to explore the usage of tabs instead and make the tab hidden using the API.
06-19-2019 05:56 AM - edited 06-19-2019 05:58 AM
It is a startup workflow (workflow starts when application is started).
I think a logic based on tabs is not possible here because we have only one workflow form which informs the user about the initialization (and which should do some additional tasks in the background not visible to the user) and should close itself after the init - but keep some maintenance tasks still running. (in the previous verison it was possible that the workflow is sitll doing stuff even when the workflow was visually closed - in the current version we do not close the workflow form anymore).
Even if that way is not possible anymore, is there a maybe an easier solution to execute code within a main thread which does not rely on any user interfaces (and therefore cannot be unintentionally stopped by the end user)?
06-19-2019 07:36 AM
the best way is a custom Java plugin, but I would wait for the new 2019 release if you have the chance to do it, since it will come with a new Java API.
As workaround you may set the workflow to be opened in the left panel. If you don't provide a specific "close" button there is no way to close it and the user can switch back to the legend or bookmarks panels.
I'm sorry you are breaking your existing use case implementation, but as i said it's really a surprise it was working in such a way.
06-24-2019 02:44 AM
is the any information yet on what the changes to the Java API will mean for existing and future GMSC Java extensions?
06-24-2019 02:48 AM
thanks for your response! (and sorry for my delayed answer, I was on holiday the last 5 days)
Interesting, your hint with the workflow in the left panel.
Do you know if it is possible to set there also maybe the size (width + length) to 0 px - so that the workflow window would be invisible?
Maybe there is now an easier way to listen on such events or even create triggers which do the same stuff event based?
06-24-2019 04:54 AM
can you please clarify what "...in the panel/legend and if something was ticked/unticked" means? You may open the workflow in the datagrid instead of the left panel, if you need to keep the left panel focused, but you cannot really hide the workflow window.
BTW, the best approach would be a custom JAVA plugin in my opinion.
06-24-2019 06:11 AM
thanks again for your ongoing support!
Please see the image below which hopefully explains better what I mean:
I will keep the Java Plugin in mind, thx!