{"id":15068981,"url":"https://github.com/tsarenkotxt/rule-engine-example","last_synced_at":"2025-10-11T15:44:02.883Z","repository":{"id":245643910,"uuid":"218342496","full_name":"tsarenkotxt/rule-engine-example","owner":"tsarenkotxt","description":"Easy Rules with Spring Boot example, save rules via REST API, save composite rules via REST API, process entity through rules via REST API","archived":false,"fork":false,"pushed_at":"2019-11-10T02:13:12.000Z","size":61,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T17:33:36.271Z","etag":null,"topics":["easy-rules","java11","rest-api","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsarenkotxt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-10-29T17:17:01.000Z","updated_at":"2025-02-26T16:12:17.000Z","dependencies_parsed_at":"2024-06-23T05:54:14.602Z","dependency_job_id":"8b4532c8-40bc-4853-923a-4633d4e8b70a","html_url":"https://github.com/tsarenkotxt/rule-engine-example","commit_stats":null,"previous_names":["tsarenkotxt/rule-engine-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tsarenkotxt/rule-engine-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsarenkotxt%2Frule-engine-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsarenkotxt%2Frule-engine-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsarenkotxt%2Frule-engine-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsarenkotxt%2Frule-engine-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsarenkotxt","download_url":"https://codeload.github.com/tsarenkotxt/rule-engine-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsarenkotxt%2Frule-engine-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007627,"owners_count":26084336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["easy-rules","java11","rest-api","spring-boot"],"created_at":"2024-09-25T01:39:56.004Z","updated_at":"2025-10-11T15:44:02.831Z","avatar_url":"https://github.com/tsarenkotxt.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easy Rules with Spring Boot\nSimple example with [Rule Engine (easy-rules)](https://github.com/j-easy/easy-rules):\n- save rules via REST API\n    - save composite rules via REST API\n- process entity through rules via REST API\n\n### Requirements\n***Java 11***\n\n### Get started\n#### Run Spring Boot application\n```bash\n./gradlew bootRun\n```\n#### Save simple rule\nURL - ***http://localhost:8080/rules***             \nHTTP Method - ***POST***\n```json\n{\n  \"name\": \"person rule 1\",\n  \"description\": \"simple person rule for save\",\n  \"priority\": 1,\n  \"condition\": \"person.item.name == \\\"some item\\\"\",\n  \"action\": \"savePerson\"\n}\n```\n#### Save composite rule\nURL - ***http://localhost:8080/rules/composite***           \nHTTP Method - ***POST***\n```json\n{\n  \"name\": \"composite person rule 1\",\n  \"rules\": [\n    {\n      \"name\": \"person rule 2\",\n      \"description\": \"simple person rule for send to vendor one\",\n      \"priority\": 1,\n      \"condition\": \"person.age \u003e 10\",\n      \"action\": \"sendPersonToVendorOne\"\n    },\n    {\n      \"name\": \"person rule 3\",\n      \"description\": \"simple person rule for send to vendor two\",\n      \"priority\": 1,\n      \"condition\": \"person.item.count == 1\",\n      \"action\": \"sendPersonToVendorTwo\"\n    }\n  ]\n}\n```\n#### Process Person through rules\nURL - ***http://localhost:8080/persons***               \nHTTP Method - ***POST***\n```json\n{\n  \"name\": \"some name\",\n  \"age\": 18,\n  \"item\": {\n    \"name\": \"some item\",\n    \"count\": 1\n  }\n}\n```\n\u003e Response:\n```json\n{\n  \"person rule 1\": true,\n  \"composite person rule 1\": true\n}\n```\n#### Get available actions\nURL - ***http://localhost:8080/persons***               \nHTTP Method - ***GET***         \n\u003e Response:\n```json\n[\n  \"savePerson\",\n  \"sendPersonToVendorOne\",\n  \"sendPersonToVendorTwo\",\n  \"sendPersonToVendorThree\"\n]\n```\n#### Swagger UI\nURL - ***http://localhost:8080/swagger-ui.html#/***     \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsarenkotxt%2Frule-engine-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsarenkotxt%2Frule-engine-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsarenkotxt%2Frule-engine-example/lists"}