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.
0
-
Hi @Stephen Lopez? ,
I've attached a bare-bones example. Directions are:
- Import in Workflow Designer
- Use Info panel to switch it to a Server Workflow
- 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.
- Save the workflow and run it in the Sandbox
- 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
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar