RTWS build the bridge between the Rule Translation Service and a REST Service. Additionally to RTS is RTWS capable to execute a Prova file and returns the queries results as JSON Object.
Make sure you have Java and Maven installed. Also, install the Heroku Toolbelt.
$ git clone https://github.com/farbtrommel/rule-translation-web-service rtws
$ cd rtws
$ mvn install
$ heroku local:start
//or for windows:
$ heroku local:start -f Procfile.windows
The app should now be running on localhost:5050.
Method + URL | Body data of request | Body data of response |
---|---|---|
GET /api/from-ruleml/ | - | List of all available languages from RuleML |
GET /api/to-ruleml/ | - | List of all available languages to RuleML |
POST /api/translate/:in/:out/ | The body of the request message contains a file from type :in language | The body of the response message contains a result file from :out language |
POST /api/execute/ | {parameters: [{key: value}], language: "dmn", source: dmnDecisionTableXml} |
ProvaSolution as JSON Object |
POST /api/execute/file | see cell above | Prova source code as plain text |
The App contains a demo site. The demo site is about DMN decision table and S-FEEL (expression language from DMN). Demo shows how a decision table and S-FEEL expression will be translated to RuleML or Prova. Last but not least the app execute a sample decision. Run the app for further information.