Hoppa till huvudinnehållet

Does anyone have a working example of a python script used in Workflow 5 that shows both inputs and outputs? This activity does not appear to be well documented so an example would be helpful.

Kommentarer

1 kommentar

  • Permanently deleted user

    Hi @Stephen Lopez? ,

     

    I've attached a bare-bones example. Directions are:

    1. Import in Workflow Designer
    2. Use Info panel to switch it to a Server Workflow
    3. Copy the python script from the note in the workflow, and save it to your server. I use my workflow's "data directory" as the location in order to avoid permission issues.
    4. Save the workflow and run it in the Sandbox
    5. Use the browser console to check the outputs - make sure the console is displaying verbose-level logging. In practice, you would probably use a Client workflow to run the Server workflow (using the Run Workflow activity) and then you'd get the outputs by referencing something like =$runWorkflow1.result.pythonOutput

     

    Ensure that you have Python installed on the server for "all users" as described on https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/activities/run-python.htm and https://docs.python.org/3/using/windows.html#installation-steps. Also ensure that you have a fairly up-to-date version of on-prem Workflow (there have been some bugs with this activity in the past).

    0

Du måste logga in om du vill lämna en kommentar.