{"id":21288592,"url":"https://github.com/manugraj/wte","last_synced_at":"2026-05-20T19:34:32.840Z","repository":{"id":133640771,"uuid":"377175283","full_name":"manugraj/wte","owner":"manugraj","description":"A simple spring-native rule engine in ReST","archived":false,"fork":false,"pushed_at":"2021-06-15T15:11:28.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T15:44:06.554Z","etag":null,"topics":["graal-native","graalvm-native-image","rule-engine","spring-boot","spring-native"],"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/manugraj.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":"2021-06-15T13:37:26.000Z","updated_at":"2021-06-15T13:40:51.000Z","dependencies_parsed_at":"2023-05-03T22:23:24.284Z","dependency_job_id":null,"html_url":"https://github.com/manugraj/wte","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/manugraj/wte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugraj%2Fwte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugraj%2Fwte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugraj%2Fwte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugraj%2Fwte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manugraj","download_url":"https://codeload.github.com/manugraj/wte/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugraj%2Fwte/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33272473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"ssl_error","status_checked_at":"2026-05-20T15:12:42.300Z","response_time":356,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["graal-native","graalvm-native-image","rule-engine","spring-boot","spring-native"],"created_at":"2024-11-21T12:23:07.509Z","updated_at":"2026-05-20T19:34:32.825Z","avatar_url":"https://github.com/manugraj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# When-Then Engine\n\nA straight forward rule engine build in spring-native with graalvm-native build\n\n\n## Env Setup\n\nCheck out [BUILD](BUILD.md) document for setting up dev environment\n\n# Build\n\n- Build by running - `mvn -Pnative-image clean package`\n- Binary as `target/wte`\n\n# Test\n- Go to target folder and\n- Run `./wte -Dserver.port=8081` to verify the system running\n\n# Docker build and exe\n- Set docker memory to high value, since the compilation is AOT and requires greater memory\n    - Check for error 137 - shows memory insufficiency\n- Run `docker-compose build`\n- Run `docker swarm init`\n    - Note down the join-token\n    - Run `docker swarm join-token` to get the token again\n- Run `docker stack deploy -c dcoker-compose.yml re`\n\n## Scale\n- Run `docker service ls` -\u003e find the running re service\n- Run `docker service scale \u003cservice name\u003e=3`\n- Run `docker service ls` to verify new replicas deployed\n\n## Sample Requests\n\n```\n{\n  \"rules\" : [\n    {\n      \"when\": {\n        \"lhs\": 2,\n        \"operation\": \"EQ\",\n        \"rhs\": 2\n      },\n      \"then\": {\n        \"id\": 2,\n        \"name\" : \"Test -2\"\n      }\n    },\n    {\n      \"when\": {\n        \"lhs\": \"$user.points$\",\n        \"operation\": \"GTE\",\n        \"rhs\": 1000\n      },\n      \"data\": {\n        \"user\":{\n          \"points\" : 9999\n        }\n      },\n      \"then\": {\n        \"id\": 3,\n        \"name\" : \"Test - 3\"\n      }\n    }\n  ]\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanugraj%2Fwte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanugraj%2Fwte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanugraj%2Fwte/lists"}