First, configure the Payload in the Event definition with Content = Any Element:
Next, define properties for the Concept that will be instantiated when a new message arrives:
Next, create a RuleFunction to serve as a pre-processor for the incoming messages, and use the createInstanceFromJSON() function. For example: void rulefunction RuleFunctions.PreProc { attribute { validity = ACTION; } scope { Events.BookDataEvent bookdataevent; } body { System.debugOut("*** Instantiating BookData Concept ****"); Concepts.BookDataConcept bdInst = Instance.createInstanceFromJSON("/Concepts/BookDataConcept",bookdataevent@payload); System.debugOut("*** New BookDataConcept: "+bdInst.BookTitle +" by " + bdInst.BookAuthor + " ("+bdInst.BookPrice+")"); } }
Finally, at either the cluster or processing-unit level, set the property 'be.http.json.rootElement.ignore' to 'true':
You should see the following message emitted to the console: 2021 Nov 19 06:58:45:995 GMT -05 dev.machine INFO [$default.be.mt$.Thread.7] - [user] [jms] *** New BookDataConcept: Finnegans Wake by James Joyce (24.98)