Zum Hauptinhalt gehen

How to pass variables between custom modules

Kommentare

2 Kommentare

  • Permanently deleted user

    My input may not be the correct, but this is what I try to do.

    My understanding about a GVH module is that it is supposed to be independant, and the time to load up the module is not fixed (it looks racing the GVH loads the configured modules). Therfore it is not a good idea to assume the dependant module is exisiting even though you can access it from the other module to get the object from another module.

    I am not sure what kind of information configured one module is suppsed to be shared with the others.

    If you were you if there are big configuration information, I will try to create one workflow which read the configured file (either Json or xml), and execute the workflow from each of your custom module and get the serialized object of the configuration, and put it to the cache object so that you don't need to execute the workflow unnessary if you already have the object.

    I have not tried this idea though yet. But just thought you may try.

    Munhwan (aliased as Moon-One)

    0
  • Kevin Penner

    Munhwan brings up good points about the race conditions in loading modules and why they need to be self contained. We do have a few different ways to facilitate communication between modules however. While they do not support return values,  Commands and Events are ways to pass information and notifications between module boundaries. See the SDK section 'Commands and Events' for more information on how to implement these.

    -Kevin

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.