Skip to content Skip to footer

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()

Was This Article Helpful?

0
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami