Forum Stats

  • 3,816,042 Users
  • 2,259,133 Discussions
  • 7,893,368 Comments

Discussions

HumanTask Deadlines Duration Issue

Jack Issac
Jack Issac Member Posts: 78 Blue Ribbon
edited Jan 27, 2017 11:40AM in SOA & Process Management

Hi,

I'am using JDev 11.1.1.9

BPM Editor 11.1.1.9.0.1.7

SOA Composite Editor 11.1.1.9.0.99.99

I want expire task after 1 day, for that I selected Expire After from Task Duration Setting and I selected By Expression in "Deadlines" for task

Expression is

xp20:add-dayTimeDuration-to-dateTime(xp20:current-dateTime(),'/task:task/task:payload/ns1:TestPayload/testDurationValue') and testDurationValue is getting from payload flowing this,

/task:task/task:payload/ns1:TestPayload/testDurationValue = P0Y0M1DT0H0M0S

or

/task:task/task:payload/ns1:TestPayload/testDurationValue = P1D

or

I tried direct set duration to expression like this, xp20:add-dayTimeDuration-to-dateTime(xp20:current-dateTime(),'P0Y0M1DT0H0M0S')

but I am getting exception.

Exception is

<WorkflowServiceEngine.request> Operation 'initiateTask' failed with WorkflowException 'Error in routing slip.
The expiration specified in the routing slip could not be evaluated. The error is java.lang.IllegalArgumentException:
Make sure that the expiration duration is specified correctly. The value should conform to XML duration specifications.
', throwing BusinessFault with message:

Where is my fault?

Can you help solve this issue?

Thanks.

Jack.

Tagged:

Best Answer

  • Dan Atwood
    Dan Atwood Member Posts: 2,313
    edited Jan 27, 2017 11:40AM Answer ✓

    Hi Jack,

    Know how you feel.  I'm a little embarrassed to admit how many times I've screwed up setting human task deadlines.

    The problem is that the human task deadline has to be a string.  In the human tasks' "Deadlines" tab, in the Task Duration Setting section, click "Expire after" in the first dropdown and "By Expression" in the second.  Simply set the XPath expression to this for the one day deadline:

         "P0Y0M1DT0H0M0S"

    If you'd like to set it dynamically to a data object variable that was set upstream in the process, your XPath expression would be this:

         concat('P',/task:task/task:payload/ns1:EmployeeInfo/ns1:EmployeeSummary/ns1:Days,'DT')

    Hope this helps,

    Dan

    Jack Issac

Answers

  • Dan Atwood
    Dan Atwood Member Posts: 2,313
    edited Jan 27, 2017 11:40AM Answer ✓

    Hi Jack,

    Know how you feel.  I'm a little embarrassed to admit how many times I've screwed up setting human task deadlines.

    The problem is that the human task deadline has to be a string.  In the human tasks' "Deadlines" tab, in the Task Duration Setting section, click "Expire after" in the first dropdown and "By Expression" in the second.  Simply set the XPath expression to this for the one day deadline:

         "P0Y0M1DT0H0M0S"

    If you'd like to set it dynamically to a data object variable that was set upstream in the process, your XPath expression would be this:

         concat('P',/task:task/task:payload/ns1:EmployeeInfo/ns1:EmployeeSummary/ns1:Days,'DT')

    Hope this helps,

    Dan

    Jack Issac
  • Jack Issac
    Jack Issac Member Posts: 78 Blue Ribbon
    edited Jan 27, 2017 10:45AM

    Hi @Dan Atwood,

    Finally, it's working fine!

    This information is worth gold for me. Thanks much

    Sometimes, like this informations can be very important.

    Thanks.

    Jack.

This discussion has been closed.