Date format not being accepted by Decision Server
Issue
When sending the attribute of type Date to the Decision Server, for example:
<flightDate>2015-10-11 22:33:44.5 z</flightDate>
Following error is observed:
Error calling container custom: com.thoughtworks.xstream.converters.ConversionException: Cannot parse date 2015-10-11 22:33:44.5 z
---- Debugging information ----
class : java.util.Date
required-type : java.util.Date
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.basic.DateConverter
Default date pattern: yyyy-MM-dd HH:mm:ss.S z
Default era date pattern: yyyy-MM-dd G HH:mm:ss.S z
Alternative date pattern: yyyy-MM-dd HH:mm:ss.S z
Alternative date pattern[1]: yyyy-MM-dd HH:mm:ss.S a
Alternative date pattern[2]: yyyy-MM-dd HH:mm:ssz
Alternative date pattern[3]: yyyy-MM-dd HH:mm:ss z
Alternative date pattern[4]: yyyy-MM-dd HH:mm:ssa
path : /batch-execution/insert/com.sample.Flight/flightDate
line number : 26
class[1] : com.sample.Flight.
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2] : org.drools.core.command.runtime.rule.InsertObjectCommand
converter-type[2] : org.drools.core.runtime.help.impl.XStreamXML$InsertConverter
class[3] : org.drools.core.command.runtime.BatchExecutionCommandImpl
version : 1.4.7
-------------------------------
How to correctly send or receive date including Date values to the Decision Server?
Environment
- Red Hat JBoss BRMS
- 6.2.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.