Hi Community,
I just installed Kie Workbench and Kie Execeution
Server (Version 6.4) on Wildfly 8.x. Now I'd like to try the
"Fire-Alert" example taken from Chapter 6 of the documentation. So I put
the facts consisting of Room, Sprinkler, Alert and Fire to a jar file
and deployed it with Kie Workbench. I also added my DRL-file, validated
it and deployed it. So far, everything works fine.
Now I want to run the example with REST by executing a batch command in JSON format. The problem I have is getting the error: "
Bad request, no commands to be executed - either wrong format or no data".The attached picture visuals the REST-Call (executed by Postman).
This is the whole rest command:
POST /kie-server/services/rest/server/containers/instances/BreezePrototype HTTP/1.1
Host: localhost:8080
X-KIE-ContentType: json
Authorization: Basic a2llc2VydmVyOmtpZXNlcnZlcjEh
Accept: application/json
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 8535c021-519a-57d4-109f-66360efc03cb
{"batch-execution":{"commands":[{"insert":{"out-identifier":"Kitchen_room","return-object":true,"entry-point":"DEFAULT","object":{"de.myPackage.facts.Room":{"name":"kitchen"}}}},{"insert":{"out-identifier":"Kitchen_fire","return-object":true,"entry-point":"DEFAULT","object":{"de.myPackage.facts.Fire":{"room":{"name":"kitchen"}}}}},{"insert":{"out-identifier":"Kitchen_sprinkler","return-object":true,"entry-point":"DEFAULT","object":{"de.myPackage.facts.Sprinkler":{"room":{"name":"kitchen"},"on":true}}}},{"fire-all-rules":""}]}}
Has anybody of you any idea how to solve the problem?
Regards, ian