Task 2: Deploying a RuleApp by using the REST API
You build the RuleApps using the Build Command tool, and then you deploy a RuleApp by using the REST API.
About this task
- Use the Build Command to create RuleApps.
- Use the REST API to deploy a RuleApp.
- Download a RuleApp archive.
Step 1: Building RuleApps by using the Build Command tool
You use the Build Command to create two RuleApps (see Automating builds with Build Command).
Procedure
Step 2: Deploying a RuleApp archive
You deploy a RuleApp by using the REST API.
Procedure
- On the REST API tab, open the /ruleapps tab, and select POST - deployRuleAppArchive.
- In Request Body, browse to /resruleappmanagement/data/test_deployment.jar.
- Click Call method.
- In the Response area, ensure that HTTP Status 200 is displayed.
- On the Explorer tab, select the RuleApp test_deployment to display its two rulesets.
- Select the ruleset loan_validation_with_score_and_grade and click Show managed URI to display the associated XOM.
Step 3: Downloading the RuleApp archive
After the RuleApp is deployed, you can download it to an archive.
Procedure
- On the Explorer tab, select the RuleApp test_deployment.
- In the RuleApp view, click Download Archive. A compressed file of the RuleApp is downloaded to your computer.
- Save the archive to the /resruleappmanagement/work directory.