elsa-workflows / elsa-workflows/elsa-core

MongoDb Persistence - Double quotes around data in the ActivityData property of the WorkflowInstances collection

Open
#4,637 0 comments 2 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Hi,

I'm using persistence with MongoDb and I noticed that the data is persisted with double quotes in the **'ActivityData'** property of the **'WorkflowInstances'** collection, as we can see in the image below:

![image](https://github.com/elsa-workflows/elsa-core/assets/42707066/e3d64948-a253-4f78-a716-f37bad07f6bc)

This causes the message body to be sent to RabbitMq as a string instead of pure JSON, using the activity **'Elsa.Activities.RabbitMq'**, as we can see in the image below:

![image](https://github.com/elsa-workflows/elsa-core/assets/42707066/1338360d-5c5a-41c2-8349-1b2412c6fc7e)

When trying to deserialize the message, an error occurs because it is not valid JSON.

This behavior may be occurring because the **'ActivityData'** property type is defined as **'Dictionary'** in the entity.

More Info:

**Elsa.Persistence.MongoDb Version:** 2.13.0
**Elsa.Activities.RabbitMq Version:** 2.13.0

Tks!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the ActivityData value in the MongoDB WorkflowInstances collection with Elsa.Persistence.MongoDb 2.13.0 and tracing it into the Elsa.Activities.RabbitMq message body. Compare the stored value with the expected JSON and confirm that deserialization succeeds without the extra quotes; the issue does not name source files or tests to inspect.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, mongodb, rabbitmq
Domain
database, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.