Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Due date XPath expression in BPM 12c

Sravani GajulaDec 23 2014 — edited Dec 24 2014

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.

This post has been answered by Dan Atwood on Dec 24 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 21 2015
Added on Dec 23 2014
1 comment
1,163 views