The Publish Event activity publishes a named event in a VertiGIS viewer application like VertiGIS Studio Web or VertiGIS Studio Mobile.
Events provide a mechanism for one part of an application to notify other parts of the application that something has happened. Event publishers, like this activity, publish (or broadcast) that a specific event has occurred. The event has a name and optionally some data relevant to the event. Event subscribers are the parts of the application that subscribe to specific named events and then receive notifications when the event is published. Typically, event subscribers will take some action in response to an event.
Publishing events may trigger asynchronous operations in the host application, but the Publish Event activity will always complete immediately.
To see a complete list of Geocortex Viewer for HTML5 events and the event arguments they take, see Geocortex Viewer for HTML5 Events.
Event Name |
Required Type: String The name of the event to publish. |
Event Argument |
Optional Type: any The event argument data to publish. Depending on the event name specified an event argument may be required. |
This activity has no outputs.
For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.
This activity works when the device has intermittent connectivity to the network.
This example outlines the procedure for sending data between two workflows using the Publish Event activity and the VertiGIS Studio Web Event Service. One workflow publishes an event with data. A second workflow is triggered by that event and consumes the data.
Workflow 1: Create the publishing workflow
This workflow sends the event and its associated data.
1.Create a new workflow in VertiGIS Studio Workflow Designer.
2.Place a Display Form activity in the workflow.
3.Add a Button Bar to the form and add a click event to one of the buttons.
4.Edit the Click Event and add the Publish Event activity.
5.Set the Event Name field to MyExternalEvent.
6.Set the Event Argument field to ={ message: $emitterForm.state.messageTextArea.value }.
When this workflow runs, it broadcasts the MyExternalEvent within the application.
Workflow 2: Create the subscribing workflow
This workflow receives the event and its associated data.
1.Create a new workflow in VertiGIS Studio Workflow Designer.
2.Place a Display Form activity in the workflow.
3.Select the header of the form and under Events > external, click Add.

4.Name the external event.

5.Once you have entered a name, this adds an event handler for that named event.

You can then edit the event handler as you would any other, adding the necessary sequence of activities to be executed when that event is received.
This is an example application in Studio Web that shows the two workflows: Event Emitter and Event Receiver.

See also...
Geocortex Viewer for HTML5 Events