{"id":37022773,"url":"https://github.com/hzn6426/easy-work","last_synced_at":"2026-01-14T02:43:25.646Z","repository":{"id":327370464,"uuid":"1106832562","full_name":"hzn6426/easy-work","owner":"hzn6426","description":"The simple, easy-used, stupid workflow engine for Java","archived":false,"fork":false,"pushed_at":"2025-12-17T09:10:01.000Z","size":601,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-20T20:49:57.484Z","etag":null,"topics":["java","parallel-processing","process","workflow","workflow-engine"],"latest_commit_sha":null,"homepage":"https://github.com/hzn6426/easy-work/blob/master/docs/WIKI.md","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hzn6426.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-11-30T03:03:47.000Z","updated_at":"2025-12-17T09:10:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hzn6426/easy-work","commit_stats":null,"previous_names":["hzn6426/easy-work"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hzn6426/easy-work","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzn6426%2Feasy-work","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzn6426%2Feasy-work/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzn6426%2Feasy-work/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzn6426%2Feasy-work/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hzn6426","download_url":"https://codeload.github.com/hzn6426/easy-work/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hzn6426%2Feasy-work/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408723,"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":["java","parallel-processing","process","workflow","workflow-engine"],"created_at":"2026-01-14T02:43:25.095Z","updated_at":"2026-01-14T02:43:25.636Z","avatar_url":"https://github.com/hzn6426.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"***\n\n\u003cdiv align=\"center\"\u003e\n    \u003cb\u003e\u003cem\u003eEasy Work\u003c/em\u003e\u003c/b\u003e\u003cbr\u003e\n    The simple, easy-used, stupid workflow engine for Java™\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003c/div\u003e\n\n***\n\n📖 English | 📖 [中文](docs/README_CN.md)\n\n## What is Easy Work?\n\nEasy Work is a workflow engine for Java. It provides concise APIs and building blocks for creating and running composable workflows. \n\nIn Easy Work, work units are represented by the `Work` interface, while workflows are represented by the `WorkFlow` interface. \n\nEasy Work provides six implementation methods for the WorkFlow interface:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./img/workflow.png\" width=\"70%\"\u003e\n\u003c/p\u003e\n\nThose are the only basic flows you need to know to start creating workflows with Easy Work.\n\nYou don't need to learn a complex notation or concepts, just a few natural APIs that are easy to think about.\n\n## How does it work ?\nFirst let's write some work:\n\n```java\npublic class PrintMessageWork implements Work {\n\n    private final String message;\n\n    public PrintMessageWork(String message) {\n        this.message = message;\n    }\n\n    @Override\n    public String execute(WorkContext workContext) {\n        System.out.println(message);\n        return message;\n    }\n}\n```\nThis unit of work prints a given message to the standard output. Now let's suppose we want to create the following workflow:\n1. print `a` three times\n2. then print `b` `c` `d` in sequence \n3. then print `e` `f` in parallel\n4. then if both `e` and `f` have been successfully printed to the console, print `g`, otherwise print `h`\n5. finally print `z`\n\nThis workflow can be illustrated as follows:\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./img/example.png\" width=\"70%\"\u003e\n\u003c/p\u003e\n\n* `flow1` is a `RepeatFlow` of work which print `a` three times\n* `flow2` is a `SequentialFlow` of work which print `b` `c` `d` in sequence order\n* `flow3` is a `ParallelFlow` of work which respectively print `e` and `f` in parallel\n* `flow4` is a `ConditionalFlow` based on conditional judgment. It first executes `flow3` then if the result is successful (in the state of 'Complete') execute `g`, otherwise, execute `h`\n* `flow5` is a `SequentialFlow`, which ensures the sequential execution of `Flow1`, `Flow2`, `Flow4`, and finally executes `z`\n\nWith Easy Work，this workflow can be implemented with the following snippet:\n```java\nPrintMessageWork a = new PrintMessageWork(\"a\");\nPrintMessageWork b = new PrintMessageWork(\"b\");\nPrintMessageWork c = new PrintMessageWork(\"c\");\nPrintMessageWork d = new PrintMessageWork(\"d\");\nPrintMessageWork e = new PrintMessageWork(\"e\");\nPrintMessageWork f = new PrintMessageWork(\"f\");\nPrintMessageWork g = new PrintMessageWork(\"g\");\nPrintMessageWork h = new PrintMessageWork(\"h\");\nPrintMessageWork z = new PrintMessageWork(\"z\");\n\nWorkFlow flow = aNewSequentialFlow(\n    aNewRepeatFlow(a).times(3),\n    aNewSequentialFlow(b,c,d),\n    aNewConditionalFlow(\n        aNewParallelFlow(e,f).withAutoShutDown(true)\n    ).when(\n        WorkReportPredicate.COMPLETED,\n        g,\n        h\n    ),\n    z\n);\naNewWorkFlowEngine().run(flow, new WorkContext());\n```\n## Pause Workflow\nNow(from v1.0.5) the workflow support the `break point`, which can pause the workflow, do something \nthen recovery the workflow. You can use it in `Any` position of the workflow.\n\nFor example, you can break the point at `c` work, and then recovery to execute.\n\nThis workflow can be illustrated as follows:\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./img/point.png\" width=\"70%\"\u003e\n\u003c/p\u003e\n\nThis workflow can be implemented with the following snippet:\n```java\nSequentialFlow flow = aNewSequentialFlow(\n    aNewRepeatFlow(a).times(3),\n    aNewSequentialFlow(b,aNamePointWork(c).point(\"C_BREAK_POINT\"),d),\n    aNewConditionalFlow(\n        aNewParallelFlow(e,f).withAutoShutDown(true)\n    ).when(\n        WorkReportPredicate.COMPLETED,\n        g,\n        h\n    ),\n    z\n);\n//execute to the break point\nflow.execute(\"C_BREAK_POINT\");\nSystem.out.println(\"execute to the break point `C_BREAK_POINT`\");\n//recovery execute from the `C_BREAK_POINT` to the end.\nflow.execute();\n```\n\nThis is not a very useful workflow, but just to give you an idea about how to write workflows with Easy Work.\n\nYou can view more test cases in `test/java`.\n\nYou can find more details about all of this in the [wiki](docs/WIKI.md)\n\n\u003cb\u003eNote: Some of the naming conventions for the APIs in this project refer to \u003ca href=\"https://github.com/j-easy/easy-flows\"\u003e Easy flow\u003c/a\u003e\u003c/b\u003e, a very simple and easy-to-use process engine.\u003c/b\u003e\n\n## License\n\nEasy Work is released under the Apache License Version 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhzn6426%2Feasy-work","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhzn6426%2Feasy-work","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhzn6426%2Feasy-work/lists"}