How to call a command in the HTML viewer using ExternalActivityBase
Suppose I have a custom module in the HTML viewer where I registered a command. Can I call it using a .NET ExternalActivityBase class from a workflow, or is RunExternalCommand the only option?
0
-
So, I found out how this works just after I posted this :-)
What you need to do is register an external handler, e.g.var dispatcher = <geocortex.workflow.DefaultActivityDispatcher>this.app.getWorkflowActivityDispatcher(); dispatcher.registerExternalIdHandler("MyCommand", this.executeMyCommand);The called method gets two parameter passed in: the context and the dispatcher:private executeMyCommand(context: geocortex.workflow.ActivityContext, dispatcher: geocortex.workflow.ActivityDispatcher) { }
Now I have just one more question: What is the best way to implement this? Currently I have everything inside the module class, but I'm not sure if that's the recommended way to do it.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar