| Summary: | Unable to execute rules via Rest API | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Sudheer <schekka> |
| Component: | Kie-Server | Assignee: | Edson Tirelli <etirelli> |
| Status: | CLOSED EOL | QA Contact: | Karel Suta <ksuta> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2.0 | CC: | eschabel |
| Target Milestone: | ER3 | ||
| Target Release: | 6.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 19:08:53 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Sudheer
2016-03-03 23:00:49 UTC
Due to limitations in some of the JEE containers, we had to change the POST URI for version 6.2. The linked example is outdated. The correct URI for the POST in step 18 is: http://localhost:8080/kie-server/services/rest/server/containers/instances/container-loan1.0 Instead of: http://localhost:8080/kie-server/services/rest/server/containers/container-loan1.0 Documentation also needs to be updated. Eric, can I ask you please to do a quick update on the example? I will update the kie docs. I was just told that X-KIE-ContentType HTTP header [1] needs to be set as well for the rest calls to work. Can this be incorporated into the documentation too if it is required. [1] https://access.redhat.com/solutions/2129781 (In reply to Edson Tirelli from comment #2) > Due to limitations in some of the JEE containers, we had to change the POST > URI for version 6.2. The linked example is outdated. > > The correct URI for the POST in step 18 is: > > http://localhost:8080/kie-server/services/rest/server/containers/instances/ > container-loan1.0 > > Instead of: > > http://localhost:8080/kie-server/services/rest/server/containers/container- > loan1.0 > > Documentation also needs to be updated. > > Eric, can I ask you please to do a quick update on the example? I will > update the kie docs. > that fix is already in the project... Readme shows this new url already? Eric, ReadMe still shows POST url in Step 18 without the context "instances". Edson, I tried with the new url you mentioned on 6.2 and I am getting empty response back following the steps in the same example: <response type="SUCCESS" msg="Container DevServer successfully called."> <results> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <execution-results> <results> <item key="applicant"/> <item key="loan"/> </results> <facts> <item key="applicant"/> <item key="loan"/> </facts> </execution-results> </results> </response> I am using this input: <batch-execution> <insert out-identifier="applicant"> <com.redhat.loandemo.Applicant> <name>Eric D. Schabell</name> <creditScore>530</creditScore> </com.redhat.loandemo.Applicant> </insert> <insert out-identifier="loan"> <com.redhat.loandemo.Loan> <amount>4500</amount> <duration>24</duration> <interestRate>1.5</interestRate> </com.redhat.loandemo.Loan> </insert> <fire-all-rules /> </batch-execution> However for the same rules server on BRMS 6.1, it just works fine with this response: <response type="SUCCESS" msg="Container container-loan1.0 successfully called."> <results> <execution-results> <result identifier="applicant"> <com.redhat.loandemo.Applicant> <name>Eric D. Schabell</name> <creditScore>530</creditScore> </com.redhat.loandemo.Applicant> </result> <result identifier="loan"> <com.redhat.loandemo.Loan> <amount>4500</amount> <duration>24</duration> <interestRate>1.5</interestRate> <approved>true</approved> </com.redhat.loandemo.Loan> </result> <fact-handle identifier="applicant" external-form="0:1:1061539597:1061539597:1:DEFAULT:NON_TRAIT"/> <fact-handle identifier="loan" external-form="0:2:475324772:475324772:2:DEFAULT:NON_TRAIT"/> </execution-results> </results> </response> (In reply to Sudheer from comment #5) > Eric, ReadMe still shows POST url in Step 18 without the context "instances". > Fixed for sure now in master and part of v1.2 tag of the demo project. Cool, I see the updated Post URL now. Thanks Eric. I also had to use customer header "X-KIE-ContentType: xstream" to get it working for BRMS 6.2. @Eric, I sent you a PR for your git example. This issue can be closed now. Thank you guys. Yes, the X-KIE-ContentType header is mandatory for content type application/xml. |