How to execute workflow in synchronous mode
Summary
The purpose of this document is to provide ability to execute workflow steps in synchronous mode in Test and Production Environments. The use case of this mode is when a client needs real time and quick workflow executions instead of waiting in queue for celery service to pick tasks and execute them.
How to Enable the property
This property is not implemented on front end of the web application, and can only be set using shell. In the start step of a workflow the property needs to be added execution_mode
as SYNC
# Import Models
from axonator.models import Steps
# Fetch Start Step of Workflow, replace WORKFLOW_ID with actual workflow id
step = Steps.objects.get(workflow_id = WORKFLOW_ID, type = "start")
# To enable synchronous mode
step.property[0]["execution_mode"] = "SYNC"
step.save()
# To disable synchronous mode
step.property[0]["execution_mode"] = "ASYNC"
step.save()
0 Comments