This is a simple state machine engine built using ASP.NET Core. It allows defining workflows (states and transitions), starting workflow instances, executing actions, and tracking the workflow's current state. This project can be extended for business workflows, approval systems, and automation processes.
- Create and store workflow definitions.
- Start and execute workflow instances.
- Track current state of each workflow instance.
- REST API support for all operations.
git clone https://github.com/Ananya-m0140/WorkflowEngine
cd WorkflowEnginedotnet clean
dotnet build
dotnet runEndpoint:
POST http://localhost:5000/WorkflowDefinitionsRequest Body:
{
"id": "flow1",
"states": [
{
"id": "start",
"name": "Start",
"isInitial": true,
"isFinal": false,
"enabled": true
},
{
"id": "end",
"name": "End",
"isInitial": false,
"isFinal": true,
"enabled": true
}
],
"actions": []
}GET http://localhost:5000/WorkflowDefinitionsGET http://localhost:5000/WorkflowDefinitions/flow1
POST http://localhost:5000/WorkflowInstances?definitionId=flow1
POST http://localhost:5000/WorkflowInstances/{instanceId}/executeReplace {instanceId} with the actual instance ID received from the instance creation response.
GET http://localhost:5000/WorkflowInstances