Scenario:-
To explain date
time object issue I had taken this
simple scenario.
Scenario aims to calculate “OrderDeliveryFromDate “,”OrderShippingDate” from order details by applying below business rules.
- If shift = 3 then set TmpHours = 06:00:00.
- If shift = 4 then set TmpHours = 20:00:00.
- Else = set TmpHours = 15:00:00.
- Add TmpHours to “OrderCreationDate” from input.
- Add “OrderCreationDate” to “OrderDeliveryFromDate” in Output.
- Add “7 days” to “OrderCreationDate” in input.
- Add “OrderCreationDate” to “OrderShippingDate” in Output.
Business Object:-
Business Rules implementation:-
RuleLogic Name:- getOrderDateBRLogicIssue
Note:-Rule Templates are not used
Test Case:-
Used below values for Testing
Input:-
Shift=3
OrderCreationDate =2013-09-03T00:00:00.000
Expected Result:-
OrderDeliveryFromDate=2013-09-03T20:00:00.000
OrderShippingDate =2013-09-10T20:00:00.000
Output:-
OrderDeliveryFromDate=2013-09-10T20:00:00.000
OrderShippingDate =2013-09-10T20:00:00.000Problem:-
If any calculations performed on “OrderShippingDate “,It effected on “OrderDeliveryFromDate” value .
TestCase1 Input:-
TestCase1 Output:-
Resolving Steps:-
To resolve issue created a temporary variable as anytype in business rules (tempOrderCreationDate ) and saved the copy of “OrderCreationDate” value in tempOrderCreationDate using clone() method.(As shown below)
Business Rules implementation:-
RuleLogic Name:- getOrderDateBRLogic Solution
Input:-
Shift=3
OrderCreationDate =2013-09-03T00:00:00.000
Expected Result:-
OrderDeliveryFromDate=2013-09-03T20:00:00.000
OrderShippingDate =2013-09-10T20:00:00.000
Output:-
OrderDeliveryFromDate=2013-09-03T20:00:00.000
OrderShippingDate =2013-09-10T20:00:00.000
TestCase2 Input:-
TestCase2 Output:--
DownLoad the PI from below link
Please post any issues/querys related to BPM,WODM and DATAPOWER to "mdondetimss@gmail.com"
It is a very informative and useful post thanks it is good material to read this post increases my knowledge. Diagrama bpmn
ReplyDelete