# Temporal workflow definition from serverlessworkflow JSON definition

**URL:** https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414
**Category:** Community Support
**Tags:** python-sdk
**Created:** [February 27, 2023, 7:00pm UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414 "2023-02-27T19:00:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![srini\_chakravarthy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/srini_chakravarthy/32/3390_2.png) [@srini\_chakravarthy](https://community.temporal.io/u/srini_chakravarthy)
#### Post date: [February 27, 2023, 7:00pm UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414/1 "2023-02-27T19:00:41Z")

</div>

Hello,

I am building an operations workflow orchestration tool using the Temporal platform and Python SDK. For this I need to translate a workflow built on the front end application (using React Flow) into a Temporal workflow definition. I have been trying to do this by converting the front end workflow into a JSON in the serverlessworkflow specification and converting the JSON to a Temporal workflow definition.

I haven’t been able to build or find a robust solution that can translate serverless workflow definitions into a Temporal workflow definition. Any suggestions on approach or references to libraries would be super helpful.

thank you!

---

<div class="post-metadata">

### Author: ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)
#### Post date: [February 27, 2023, 7:05pm UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414/2 "2023-02-27T19:05:45Z")

</div>

While I do not have anything specific to serverless, it is quite normal for people to pass in the entire DSL structure as a workflow parameter and evaluate it in the workflow. Most people represent this as a typed dataclass structure, but it could be JSON/YAML, etc. Then in the workflow if you need to loop and call activities or children or timers or add signal handlers or whatever, you can. The things you call from a workflow do not have to be predefined (e.g. calling an activity by its string name is very normal in these cases).

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [February 27, 2023, 8:44pm UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414/3 "2023-02-27T20:44:35Z")

</div>

Just to add, you can use the serverless workflow [sdk-python](https://github.com/serverlessworkflow/sdk-python) to parse the workflow definition json/yaml into an object model and then follow the workflow states to build out your activity calls etc.  
There is a sample for Java SDK using that DSL [here](https://github.com/temporalio/samples-java/tree/main/src/main/java/io/temporal/samples/dsl) if it can help for references.

---

<div class="post-metadata">

### Author: ![srini\_chakravarthy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/srini_chakravarthy/32/3390_2.png) [@srini\_chakravarthy](https://community.temporal.io/u/srini_chakravarthy)
#### Post date: [February 28, 2023, 7:15pm UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414/4 "2023-02-28T19:15:40Z")

</div>

Thanks @Chad_Retz and @tihomir. This was helpful!

---

<div class="post-metadata">

### Author: ![Nikunj\_Mehadia](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/nikunj_mehadia/32/5366_2.png) [@Nikunj\_Mehadia](https://community.temporal.io/u/Nikunj_Mehadia)
#### Post date: [September 11, 2024, 11:38am UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414/6 "2024-09-11T11:38:40Z")

</div>

Adding on to this.  
@tihomir I want to persist multiple serverless workflow definitions as json in a central context (using PostgreSQL probably), and then retrieve the required DSL workflow definition according to some key and convert it into a Workflow to run it.  
However, while doing so, I am getting an error that the string is not able to parse as Workflow

This is the error:  
Caused by: io.temporal.common.converter.DataConverterException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of io.serverlessworkflow.api.interfaces.State (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information

---

<div class="post-metadata">

### Author: ![Sachin\_Verma](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/sachin_verma/32/8143_2.png) [@Sachin\_Verma](https://community.temporal.io/u/Sachin_Verma)
#### Post date: [January 12, 2026, 1:55pm UTC](https://community.temporal.io/t/temporal-workflow-definition-from-serverlessworkflow-json-definition/7414/7 "2026-01-12T13:55:26Z")

</div>

Did you able to find any good solution ?
