elsa-core/samples/aspnet/Elsa.Samples.AspNet.WorkflowServer/mysterious_pond.http
Sipke Schoorstra 100ece8278
Add JSON Serialization for Elsa expression (#5490)
* Add JSON Serialization for Elsa expression

Extended the expression serialization. Added new classes ExpressionJsonConverter and ExpressionJsonConverterFactory implementing serialization of expression objects. Also, made respective changes in different serializers and related files for seamless integration.

* Fix XML comments

* Set initial builder Id in ClrWorkflowProvider

This commit involves a modification in ClrWorkflowProvider.cs where an Id was set for the builder. The Id was set with the format `workflowBuilderType.Name`:1.0, providing a deterministic identifier for each builder instance.

* Add MysteriousPondWorkflow and associated HTTP endpoints

A new workflow, MysteriousPondWorkflow, has been introduced along with HTTP endpoints to interact with it. The workflow simulates throwing an arbitrary amount of rupees into a mysterious pond and getting a luck prediction for the day based on the amount. An integration of this workflow is registered in the main Program.cs file, and the necessary directories to handle this workflow have been added to relevant project files.
2024-06-03 08:38:18 +02:00

32 lines
605 B
HTTP

### POST 1000 rupees to the mysterious pond.
POST https://localhost:5001/workflows/mysterious_pond
Content-Type: application/json
{
"rupees": 1000
}
### POST 500 rupees to the mysterious pond.
POST https://localhost:5001/workflows/mysterious_pond
Content-Type: application/json
{
"rupees": 500
}
### POST 250 rupees to the mysterious pond.
POST https://localhost:5001/workflows/mysterious_pond
Content-Type: application/json
{
"rupees": 250
}
### POST 100 rupees to the mysterious pond.
POST https://localhost:5001/workflows/mysterious_pond
Content-Type: application/json
{
"rupees": 100
}