Zum Hauptinhalt gehen

Getting workflow results into custom module

Kommentare

1 Kommentar

  • Berend Veldkamp
    Starting a workflow from your module is trivial:  this.app.command("RunWorkflowWithArguments").execute(...); To get information from the workflow back to your module, you could either implement an external command in your module, which is called by the workflow, or wait for the workflow to finish by listening to the WorkflowCompletedEvent: this.app.event("WorkflowCompletedEvent").subscribe(this, (workflow: geocortex.essentials.Workflow, outputs: any) => { if (workflow.id === "myWorkflowId") {     // parse outputs     } }); The event handler has two arguments, the workflow that was finshed, and the outputs. You have to check if that workflow is the one you're interested in. 

     

    If the workflow fails, this event is not raised (IIRC), so you may need to listen to the WorkflowAbortedEvent event too, if your code relies on the workflow to finish.

     

    The SelectFeatures activity does not have a Container Name property, so I doubt you can display it in a region other than the one defined in your viewer's configuration (i.e. desktop.json.js). A workaround would be to have the results shown in table format, this will show them below the map instead of to the left of it. To do this, call the SwitchToTabularResultsView external command from your workflow.

     

     

     
    0

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