Listen For External Event example.
Hello,
I was wondering if anyone has a workflow example that includes the Collect External Event Args or Listen For External Event commands? I would like to listen for the MapMouseClickedEvent and only continue the workflow after the user clicks on the map. I have tried adding both of these commands to my workflow bu I don't seem to be able to get them to work properly.
Thanks,
Benjamin Zank
-
Generally you would use ListenForExternalEvent first, which sets up the listener, but does not do anything on its own. Then you can use CollectExternalEventArgs to wait for the event (and collect its arguments if they happen to be serializable -- not the case for most).
Unfortunately, all of the various mouse clicking events appear to be non-functional at present time. I've filed this as a bug as I believe they would be quite useful in workflows.
0 -
It's been a couple months, so I'm wondering if mouse click events are accessible in the more current (3.5 +) versions of Geocortex Essentials.
I want to be able to use the map module (user right-clicks on the map to get the map module menu) to deliver some functionality which requires access to the point at which they clicked. However, it's the click that takes place before the workflow is activated so maybe it's not do-able.
Thanks for all the good work,
Sonia
0 -
I agree! I too would like to see the listeners work for all mouse events, and an event for mouseup should be exposed. I can currently only get it to work for the pan events. Also, Identify and Capture Geometry shouldn't be triggered by user pan. Our user tests have shown that this is a significant problem when the Identify is "sticky."
0 -
Hi Benjamin,
I agree with Jonathan, actually all these events can not be listened to from workflow because they are returning json objects with circular reference (Only few).I would suggest you could write a custom module and register for this event. To get the arguments passed and make it reusable, you could use Dynamic External Activity in the workflow.
I have done this with the similar events which don't work in workflow directly in HTML5 viewer.
Regards,
Mohammad Ashraf0 -
In a workflow can you listen for external events using ListenForExternalEvent to listen for a windows.postmessage message? where upon receipt of a message from the windows.postmessage function it would run a workflow with arguments provided by the message? using the CollectExternalEventArgs function in workflow? 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare