workflow-core icon indicating copy to clipboard operation
workflow-core copied to clipboard

JSON serialization failed for output parameter

Open HeHubo opened this issue 3 years ago • 2 comments

Describe the bug If the class of an output parameter of a workflow step have "self referencing" properties, the serialization failed with the following error message: "Self referencing loop detected for property 'XXXXX' with type 'XXXXXXX'"

We use EF Core models as in- and output values.

To Reproduce Steps to reproduce the behavior:

  • Usa a class construct with self referencing values.

Expected behavior A clear and concise description of what you expected to happen.

Usage of an own serializer. Set option of the standard serializer to handle self referencing properties, like this one "new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }"

Additional context Add any other context about the problem here.

HeHubo avatar Apr 22 '21 11:04 HeHubo

I think this issue occurs while the data will be stored in the "workflow" table as an JSON string.

Further question: Is it possible to avoid storing the workflow data in the persistence store? Storing all input and output data of a workflow bears the risk that the data storage can become very large.

HeHubo avatar Apr 22 '21 11:04 HeHubo

I think ReferenceLoopHandling.Ignore should be the standard behavior.

wingi11 avatar Nov 28 '22 19:11 wingi11