{"id":19100172,"url":"https://github.com/thomasduft/microwf","last_synced_at":"2026-01-14T05:00:17.450Z","repository":{"id":24526983,"uuid":"101836297","full_name":"thomasduft/microwf","owner":"thomasduft","description":"A simple finite state machine (FSM) with workflow character where you define your workflows in code.","archived":false,"fork":false,"pushed_at":"2025-12-22T09:49:54.000Z","size":7477,"stargazers_count":179,"open_issues_count":6,"forks_count":49,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-12-23T20:39:05.525Z","etag":null,"topics":["dotnet","finite-state-machine","fsm","workflow","workflow-engine","workflows"],"latest_commit_sha":null,"homepage":"http://www.tomware.ch/2018/04/30/building-a-simple-workflow-system-with-asp-net-core/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasduft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-08-30T04:06:40.000Z","updated_at":"2025-12-22T09:49:57.000Z","dependencies_parsed_at":"2024-01-09T22:49:03.774Z","dependency_job_id":"0ef8dc0d-3b63-4827-85c7-1cf7307da64c","html_url":"https://github.com/thomasduft/microwf","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/thomasduft/microwf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasduft%2Fmicrowf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasduft%2Fmicrowf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasduft%2Fmicrowf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasduft%2Fmicrowf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasduft","download_url":"https://codeload.github.com/thomasduft/microwf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasduft%2Fmicrowf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28410055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","finite-state-machine","fsm","workflow","workflow-engine","workflows"],"created_at":"2024-11-09T03:52:32.453Z","updated_at":"2026-01-14T05:00:17.409Z","avatar_url":"https://github.com/thomasduft.png","language":"C#","funding_links":[],"categories":["dotnet"],"sub_categories":[],"readme":"[![build](https://github.com/thomasduft/microwf/workflows/build/badge.svg)](https://github.com/thomasduft/microwf/actions) [![NuGet Release](https://img.shields.io/nuget/vpre/tomware.Microwf.AspNetCoreEngine.svg)](https://www.nuget.org/packages/tomware.Microwf.AspNetCoreEngine) [![BuitlWithDot.Net shield](https://builtwithdot.net/project/351/microwf-a-simple-finite-state-machine-fsm-with-workflow-character-where-you-define-your-workflows-in-code./badge)](https://builtwithdot.net/project/351/microwf-a-simple-finite-state-machine-fsm-with-workflow-character-where-you-define-your-workflows-in-code.)\n\n# microwf\n\nA simple finite state machine (FSM) with workflow character where you define your workflows in code.\n\n### Holiday approval sample\n\n![Holiday Aproval](/holidayapproval.png)\n\nIn code it looks like:\n\n```csharp\npublic class HolidayApprovalWorkflow : WorkflowDefinitionBase\n{\n  public override string Type =\u003e nameof(HolidayApprovalWorkflow);\n\n  public override List\u003cTransition\u003e Transitions\n  {\n    get\n    {\n      return new List\u003cTransition\u003e\n      {\n        new Transition {\n          State = \"New\",\n          Trigger = \"Apply\",\n          TargetState =\"Applied\",\n          CanMakeTransition = MeApplyingForHolidays\n        },\n        new Transition {\n          State = \"Applied\",\n          Trigger = \"Approve\",\n          TargetState =\"Approved\",\n          CanMakeTransition = BossIsApproving,\n          AfterTransition = ThankBossForApproving\n        },\n        new Transition {\n          State = \"Applied\",\n          Trigger = \"Reject\",\n          TargetState =\"Rejected\"\n        }\n      };\n    }\n  }\n\n  private bool MeApplyingForHolidays(TransitionContext context)\n  {\n    var holiday = context.GetInstance\u003cHoliday\u003e();\n\n    return holiday.Me == \"Me\";\n  }\n\n  private bool BossIsApproving(TransitionContext context)\n  {\n    var holiday = context.GetInstance\u003cHoliday\u003e();\n    \n    return holiday.Boss == \"NiceBoss\";\n  }\n  \n  private void ThankBossForApproving(TransitionContext context)\n  {\n    // SendMail(\"Thank you!!!\");\n  }\n}\n```\n\n### Running the samples\n\nAssuming you downloaded the sources and opened the directory with [VS Code](https://code.visualstudio.com/) you should be good to go! Ahh and of course you need [.NET Core](https://dotnet.microsoft.com/download) and [node.js](https://nodejs.org/en/) installed on your development environment.\n\n#### Running the WebApi backend\n\n1. Open the integrated terminal in VS Code and type\n\n\u003e dotnet build\n\nThat ensures you are able to build the dotnet related stuff!\n\n2. Hit F5 or go to the VS Code Debug tab (Ctrl+Shift+D) and run the WebApi project.\n\n3. Once the project has started head over to your browser of choice and type in https://localhost:5001.\n\nYou should see now the login screen.\n\n\u003e For developing purpose there exists a compound task named `dev:be-fe 🚀` that spins up the WebApi project with the `dotnet watch run` command as well as the [Angular](https://angular.io/) based WebClient project with the `npm run start` command. \n\n### Administrator Web UI\n\nA web interface allows an administrator to search for workflow instances and have a look into the current state.\n\n![Admin](https://www.tomware.ch/2018/11/27/sample-workflow-system-with-asp-net-core-angular-and-microwf-explained-new-ui/admin.gif)\n\nHappy poking!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasduft%2Fmicrowf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasduft%2Fmicrowf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasduft%2Fmicrowf/lists"}