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!

Implementation of Holiday & Calendar in SLA

3340980Mar 9 2017 — edited Mar 27 2017

Hi, I am trying to calculate slaDate using two different scenarios.

Scenario -1

The business rule that I have created returns the slaDuration (like - '5DT0H', '0DT4H' etc.). I am assigning output of business rule data association to a dateTime variable say - slaDate using below function and this is working fine.

xp20:add-dayTimeDuration-to-dateTime(bpmn:getDataObject('processData')/ns:caseDetails/ns:receivedDate,concat('P', bpmn:getDataOutput('slaDuration')))

The return type of this function is like - 2017-03-13T07:44:04-05:00

Here receivedDate is of dateTime data type (YYYY-MM-DDTHH:MM:SS)

Scenario -2

Now, I have created a holiday & Calender using Oracle 12C Jdeveloper 'Organization' and requirement is to calculate slaDate (similar to scenario -1) using holiday & calendar.

In the output of business rule data association, I am trying to use below function

bpm:addBusinessCalendarDuration(bpmn:getDataObject('processData')/ns:caseDetails/ns:receivedDate,bpmn:getDataOutput('slaDuration'),'shiftCalendar','YYYY-MM-SSTHH:MM:SS')

But, at run time I am getting error message

-----------------------------

<dataObject name="FaultMessage" isBusinessIndicator="false">

         <value>

            <![CDATA[oracle.bpm.bpmn.engine.model.runtime.microinstructions.TrappableException: faultName: {{http://schemas.oracle.com/bpel/extension}subLanguageExecutionFault}

messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}

cause: {XPath expression failed to execute.

An error occurs while processing the XPath expression; the expression is bpm:addBusinessCalendarDuration(bpmn:getDataObject('processData')/ns:caseDetails/ns:receivedDate,'5','shift calendar','YYYY-MM-DDTHH:MM:SS').

The XPath expression failed to execute; the reason was: ORABPEL-30043

exception.code:30043

exception.type: ERROR

exception.severity: 2

exception.name: Error in evaluating workflow service XPath extension function.

exception.description: Error in evaluating task service XPath extension function bpmn:addBusinessCalendarDuration.

exception.fix: Check the error stack and fix the cause of the error.

Check the detailed root cause described in the exception message text and verify that the XPath query is correct.

}

]]>

----------------------------------

Could you please assist me to correct this function or is there any alternate way to do this.

This post has been answered by 3148337 on Mar 16 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2017
Added on Mar 9 2017
6 comments
617 views