clara

http://www.clara-rules.org/
Konstantinos Tzanidakis 2019-12-10T13:05:25.081300Z

Hi everyone, I was hoping to get some help on seriliazing the session in Clara Rules. I am fairly new to Clara and I am trying to start by implementing the example in the docs: <http://www.clara-rules.org/docs/durability/>, for my own facts (using maps along with fact-type-fn). However, during deserialization I am getting the following error: nth not supported on this type: Element. Any ideas/suggestions would be more than welcomed.

2019-12-10T14:54:00.082500Z

@konstantinos562 (1) is it possible to share what you have? & (2) can I see the full stack trace (or the Clara-part of it) coming with this exception?

Konstantinos Tzanidakis 2019-12-10T15:20:31.083500Z

@mikerod thanks a lot, I have probably figured this out, I was using maps instead of records but when I was storing the session using the serializer I was not providing the :fact-type-fn options as well as I was setting with-rulebase? to false. Most probably, because I didn't include the fact-type-fn, the deserializer was mistakenly trying to destruct the facts as "Element"s (or something like this). Thank you very much for the prompt response 🙂

2019-12-10T15:33:28.084600Z

@konstantinos562 that makes sense. Yes, the durability layer stuff can certainly be a bit complicated since you do have to do things quite specifically