Within the Python tool I want to start a VBS script whose process shall survive the execution of the workflow, but I can't get that done. Maybe someone can help?
Attached a demo workflow together with a VBS script that just says "Hello". You can also find the Python and VBS code further down in that message. The workflow just contains the Python tool, nothing else.
My observations are the following:
1) Whenever the workflow is run as a whole, the wscript.exe-process terminates after the Python tool has been executed.
2) When you execute the Python code within the Python tool, the then process persists.
PYTHON CODE START
import os
VbsScript = "Hello.vbs"
cmd = 'wscript.exe "' + os.path.join(Alteryx.getWorkflowConstant('Engine.WorkflowDirectory'),VbsScript) + '"'
cmd = '"' + os.path.join(Alteryx.getWorkflowConstant('Engine.WorkflowDirectory'),VbsScript) + '"'
os.popen(cmd)
PYTHON CODE END
VBS CODE START
MsgBox "Hello"
VBS CODE END
Can you try using a script to kick off another script? I think that the main script needs to terminate on workflow completion, but if you execute another script from that script you may be able to achieve your objective.
Hello Brandon,
thanks for your response. I also tried to work around that issue in that way, but unfortunately with the same result.
This is how it did:
It is really astonishing, but again the process of the Hello-script terminates when running the workbook. Of course, when running just the Python notebook, the process survives.