Hi All,
Requirement:
Set due date such that it should take the date from the input payload and subtract few days from the given date.
For this in Human task.task under Deadlines--> Action Requested Before , I tried giving the Due date Duration using expression as: xp20:subtract-dayTimeDuration-from-dateTime(/ns0:Date,'P2D') - xp20:current-dateTime() as we know that the difference of two dates will be duration.
But I got the following error:
<faultInfo>exception.code:30046
exception.type: ERROR
exception.severity: 2
exception.name: Error in routing slip.
exception.description: The expiration specified in the routing slip could not be evaluated. The error is java.lang.IllegalArgumentException: NaN. The routing slip is associated with the task definition test/DuedateExpression!1.0/Humantask.
exception.fix: Make sure that the expiration duration is specified correctly. The value should conform to XML duration specifications.
Then I tried giving the following expression:
xsd:dateTime(xp20:subtract-dayTimeDuration-from-dateTime(/ns0:Date,'P2D')) - xsd:dateTime(xp20:current-dateTime()) -- This expression when used in XSL gave the duration.
When used the same in Xpath expression again resulted in an error.
Then tried adding "xsd" namespace in the source code of human task at routing slip which also dint work.
In Xpath expression builder, Date functions have only dateTime functions but the result we want is a "duration".
Thanks,
Sravani.