0

We have Java logic like this, we want to achieve through json condition manager:

((eConsentDate == null) || (!(eConsentDate == null) && !(leSentDate == null) && !(leReceivedDate == null) &&(leReceivedDate.after(currentDate))) ||(!(eConsentDate == null) && !(leSentDate == null) && !(leReceivedDate == null) && (leReceivedDate.before(currentDate) || (leReceivedDate.equals(currentDate)) && !(cdSentDate == null) &&!(cdReceivedDate == null) && (cdReceivedDate.after(currentDate))))

I have written json condition manager like this

{
  "conditionsList": [
    {
      "conditionName": "eConscentDate",
      "conditions": [
        {
          "condition": "(eSignDisclosuresDetails.eConsentDate == null)",
          "true": {
            "count": "1"
          },
          "false": null
        },
        {
          "condition": "((eSignDisclosuresDetails.eConsentDate != null) && (eSignDisclosuresDetails.leSentDate != null) && (eSignDisclosuresDetails.leReceivedDate != null)&& (eSignDisclosuresDetails.leReceivedDate >(currentDate.getTime())))",
          "true": {
            "count": "1"
          },
          "false": null
        },
        {
          "condition": "((eSignDisclosuresDetails.eConsentDate != null) && (eSignDisclosuresDetails.leSentDate != null) && (eSignDisclosuresDetails.leReceivedDate != null) && ((eSignDisclosuresDetails.leReceivedDate.getTime().before(currentDate.getTime())) ||(eSignDisclosuresDetails.leReceivedDate.equals(currentDate))) && (eSignDisclosuresDetails.cdSentDate != null) && (eSignDisclosuresDetails.cdReceivedDate != null) && (eSignDisclosuresDetails.cdReceivedDate.after(currentDate))))",
          "true": {
            "count": "1"
          },
          "false": {
            "count": "0"
          }
        }
      ]
    }
  ]
}

But the problem is to achieve the (leReceivedDate.after(currentDate)),(cdReceivedDate.after(currentDate)),(leReceivedDate.equals(currentDate) these fields in json.

While the time of parsing it's showing unresolved access method.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Why you are using `(eSignDisclosuresDetails.leReceivedDate >(currentDate.getTime())` in one place and `(eSignDisclosuresDetails.leReceivedDate.getTime().before(currentDate.getTime())` in other? What library is used for parsing expressions? I.e. how "showing unresolved access method"? Do you have an error stack trace? – Yury Kisliak May 27 '20 at 17:08
  • yes Yury,its is pointing to date [Error: unable to resolve class: Date] – Tavantdev test May 29 '20 at 06:19

0 Answers0