Workflow module is loaded after customised modules in GVH 4.14.4
Hi,
Just found the way to initiate modules on GVH has been changed on version 4.14.4.
Previously, all Geocortex modules are loaded first and then customised modules.
In this new version, most Geocortex modules and my customised modules are loaded first. Then, the following gets loaded:
[info]: 17:27:44.880: Initializing module 'Workflow'.
[info]: 17:27:46.024: Initializing module 'Offline'.
[info]: 17:27:46.349: Initializing module 'Legend'.
[info]: 17:27:50.926: Initializing module 'Status'.
So, the problem I got is that I have a customised module that uses the workflow activity dispatcher to register an external ID, which gets used in workflows later. Looks like this in my customised module:
var dispatcher = this.app.getWorkflowActivityDispatcher();
dispatcher.registerExternalIdHandler("MyExternalID",()=>{
// this is my function
})
On 4.14.4, the workflowActivityDispatcher is null in this.app when the 'SiteServiceLayersLoadedEvent' gets fired, which is not the case for previous versions.
I tried to wait for a longer time, but it seems the dispatcher will always be null before the step of Initializing module 'Workflow', which happens after everything in my customised module finishes.
So I just wonder if there's an event other than 'SiteServiceLayersLoadedEvent' that I can subscribe in my customised modules to make sure the workflowActivityDispatcher is there for me to use?
Thanks,
Johnny
-
What if you set deferLoading to false for the Workflow module in the viewer configuration?
0 -
That works like a charm!
Seems we don't have this deferLoading option for older versions, and it was set to true by default in the new version.
Thanks heaps, Nico.
0 -
It was introduced in GVH 2.11 somewhere in 2018.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
3 commentaires