Use 'out' parameter with RunWorkflowWithArguments
In my custom module for the HTML viewer I can run a workflow by calling
this.app.command("RunWorkflowWithArguments").execute({ "workflowId": "Workflow", "parameter": "something" });
Looking at the signature of the execute parameter, it does not seem possible to use parameter types other than string, and also, there is no way to set 'out' parameters (i.e. a value set by the workflow that is passed back to the caller)
Is this correct, or am I overlooking something?
As a workaround, I could probably pass in the name of a command that the workflow is supposed to execute, but that just isn't as nice.
0
-
Hi,
Did you ever find a way to get the out parameter back in the code? I am trying to do something similiar and haven't figured it out yet.
-- Marc0 -
This is what I did:
1. Listen to the WorkflowCompletedEventthis.app.event("WorkflowCompletedEvent").subscribe(this, this.workflowCompleted);
2. The workflowCompleted method looks like this:private workflowCompleted(workflow: geocortex.essentials.Workflow, workflowOutputs: geocortex.workflow.ArgumentInfo[]): void { if (workflow.id !== "MyWorkflowId") { return; } // parse workflowOutputs }0 -
Excellent! Thanks.
--Marc0
Please sign in to leave a comment.
Comments
3 comments