Professional Documents
Culture Documents
J. B. Hunt
Project PACE
Application Design
JBH-PACE-007Rules Mass Update
Version No. 1.0
Prepared By
Name
Vikram K
Role
Developer
Reviewed by
ProjectArchitect
Approved By
JBHunt Architect
Signature
Date
C3: Protected
Controlled Copy
Design Document
Table of Contents
1.0
1.1
1.2
1.3
1.4
2.0
Introduction
3.0
4.0
5.0
6.0
9
14
15
16
Integration Design
18
18
18
7.0
UX/UI Artifacts
18
8.0
Database Design
18
9.0
18
18
18
18
10.0 References
19
20
Controlled Copy
Design Document
1.0 Introduction
1 Purpose of this document
The purpose of the detail design document is to define the detailed design of the
functionality Mass Update in Rules Landing Page that are specified in the Business
Requirement document. All the low level components, interfaces and integrations are
detailed out in this document.
2 Scope
The Scope of this document is to Mass Update for the selected rules from Rules
Landing page.
The actor will be able to perform below actions.
Select rules for one or more accounts from the rule landing page and press mass
update button.
Select the parameters and billable activities from the popup page and press
submit button.
System will fetch common and distinct parameters and billable activities from the
selected rules and displays for update.
Actor will update the parameters and billable activities and select apply.
Actor is navigated back to the landing page with the all the rules which are mass
updated and the rules are in checked condition.
Actor will not be able to uncheck the rules are remove them from the selection.
The rule name that had an error will be displayed in red and also the component
of the rule had an error will be highlighted in red.
The following functions will be available to the actor. Save, Cancel, View errors,
Edit screen.
Selecting edit, Actor will be redirected to edit landing page with all the rules(both
correct and error). Actor can edit each inline rule or massupdate.
Actor corrects all errors and selects the save and all updates are saved to the
database. All previous values will be replaced with the new updated values.
Intended Audience Selecting Viewerrors, Actor will be redirected to edit landing
page with only rules with errors. Actor can edit each inline rule or massupdate.
3
The intended audience for this document is
Developers, testers
Client
Description
RS
Rest Service
Controlled Copy
Design Document
Term
Description
SSO
Single sign-on
ESA
REST
SOA
Controlled Copy
Design Document
High Level Use Case Description:This use case describes how the user can update multiple rules
at the same time.
UC
Refere
nce
Design
Flow
Descript
ion
BP#
Business Pattern
Variations Desc
Rationalization
of why this
transaction
mapped to this
BP
Interlin
ked
Design
Flows
JBHPCE007,
Selectin
g
the
massup
date
and
selectin
g
the
paramet
ers and
billable
activities
from the
popup
will fetch
common
and
BP1.5
GRID/List
Filter
(multi attribute with
multiple
value),Pagination,So
rting,Single
Entity,
Link to Manage
Serviceimpleme
ntation will fetch
all the common
and
distinct
parameters and
billable activities
of the selected
rules.
NA
S.N
o
DF1
SCRE
EN 38
Controlled Copy
Design Document
distinct
paramet
ers and
billable
activities
assigne
d to the
selected
rules
DF2
JBHPCE007,
SCRE
EN
39
DF3
JBHPCE007,
SCRE
EN
40
DF4
JBHPCE007,
SCRE
EN
45
update
the
paramet
ers and
billable
activities
and
apply
them to
the
assigne
d rules
BP3.5
Bussiness logic
implementation.
Service
implementation
will send the
updated rules to
the rule landing
page
and
displays
rules(both
correct
and
error).
NA
Selectin
g View
Errors
will take
the user
to the
edit
landing
page
with
errors
rules.
Refer
DF3 in
JBHunt
PACE
Design
Docum
ent Edit
Rules
V.1.0
User
corrects
all
errors
and
selects
the save
and all
updates
are
saved to
the
databas
e.
Refer
DF1 in
JBHunt
PACE
Design
Docum
ent Edit
Rules
V.1.0
Controlled Copy
Design Document
DF1
Design Flow
Description (From
Section 2.2)
Fetches the common, distinct parameter and billable activities of the selected
rules.
Business Design
Pattern (From Section
2.2)
SCREEN # 38
Message Queue or
other async triggers
(if driven from
Queues)
NA
Business Micro
Services Name
List<RulesDTO>searchRules(List<SearchDTO>searchDTO)
Integration Micro
Services Name
NA
List all microservices which pulls data from DB2
BoardCodes Search Type Ahead
/rules/massupdate/search
External service
Name
NA
NA
Caching Need
Legal agreement rules for the selected accounts can be cached (if no search
criteria has been selected)
Error Message
If the user enters invalid value in Base price, the system displays Please
enter a numeric decimal value for the item selected
Controlled Copy
Design Document
If the user misses any mandatory field, the system displays Mandatory
fields are required to be filled.
If the user selects Cancel button in Mass Update popup/ overlay, the
system displays You are about to lose all changes made, do you wish to
continue? Click on Yes would cancel the process and the user would be
navigated back to the previous screen. And No would retain the user on
the Mass Update overlay with the values changed by the user displayed on
the screen.
If user clicks the Apply button in the Mass Update popup/ overlay and the
apply fails, the system display Error Occurred. Please try again after
sometime (Connection timed out, Internal Server error).
Technical
Complexities
UI Validations
To cache all the rule matrix and perform the validation for corresponding rules
from the client side.
All decimals values need to be 4 digits at the back end. On the screen the
user will see the exact value that has been entered by the user. For
example if the user has entered 30.5 for a numeric decimal field, then the
value at the back end gets stored as 30.5000 and the user sees 30.5 on
screen.
The Effective start date can be less than Present day date and the
Effective End date cannot be less than the Effective Start Date.
If the end date is left blank on the screen then the end date is defaulted to
12/31/2099 when the data is being saved to database. When the user
navigates to the screen to edit the fields and if the end date has been left
blank while creating, even in edit mode the end date will display blank.
Blank is an acceptable value for end date on the screen and blank
indicates that the date is 12/31/2099.
Rules for symbols in grids: (-) - This symbol designates that the row has
never been saved to the database and so can just be removed from the
grid. (+) - This symbol designates adding something to the grid. (x) - this
symbol means the row has been saved to the database but it has never
had an billing or payroll run using it so it can be removed by pressing the
symbol. The row will be deleted from the database.
View Templates
1.
2.
3.
4.
5.
SearchView.js
MassUpdateSelectionPopup.js
MassUpdatePopup.js
RuleDetailsLeftPanelView.js
RuleDetailsView.js
BasicInfoView.js
ParameterView.js
Controlled Copy
Design Document
ExpressionTextView.js
BillableActivityView.js
FuelSurchargeView.js
ExpressionTextPopup.js
9 Design Flow<DF2>
Design Flow # (From
Section 2.2)
DF2
Design Flow
Description (From
Section 2.2)
Fetch the inputs datas that are required for the filter in the search Grid
Business Design
Pattern (From Section
2.2)
SCREEN # 9, 10
Message Queue or
other async triggers
(if driven from
Queues)
NA
Business Micro
Services Name
List<FilterRulesDTO> filter(List<AccountDTO>)
Integration Micro
Services Name
NA
/rules/filter
External service
Name
NA
NA
Caching Need
<NA>
Error Message
<NA>
Technical
Complexities
NA
Controlled Copy
Design Document
REST
URL
HTTP
Meth
od /
Busin
ess
Oper
ation
Input / Output
Implementat
ion
Classes/Met
hod Names
Business
Rules / Logic
/ Business
Validations
BF1 MassU
pdate
Rules
/
rules/
mass
updat
e/appl
y
POS
T
Input:
CCPABusR
uleAscRepo
sitory
<NA>
{
"Rules": [{
"AccountName": "Mission
Foods - DALTX",
"AccountId": 12345,
"LegalAgreementName":
"Mission Foods - DALTX Contract",
"LegalAgreementId":
12345,
"RuleName": "Rule Name
1",
"RuleId": 12345
}],
"EffectiveStartDate":
123456789012,
"EffectiveEndDate":
123456789012,
"BasicInfo": [{
"RateStructureNameType": "XXX",
"MethodClassText":
"XXX",
"MethodClassId": 1234,
"CreditFlag": true
}],
"CommonParameter": [{
"ParameterId": 12345,
"TypeText": "XXX",
"TypeId": 12345,
"Value": "XXX",
"String": "XXX",
"MeasureBasisTypeText":
MassUpdate
RulesDTO
Controlled Copy
Design Document
"XXX",
"MeasureBasisTypeId":
1234,
"IncludeTypeText":
"XXX",
"IncludeTypeId": 1234,
"HighValue": "XXX",
"LowValue": "XXX",
"ClassLevelTypeText":
"XXX",
"ClassLevelTypeId":
1234,
"ProcessNameText":
"XXX",
"ProcessNameId": 1234,
"MeasureDescText":
"XXX",
"MeasureDescId": 1234,
"ParameterValue":
"XXX",
"ParameterValueTypeText": "XXX",
"ParameterValueTypeId":
1234,
"IsMandatory": true,
"HasValuePairAssociation": true,
"ValuePairTypeText":
"XXX",
"ValuePairTypeId": 1234,
"ValuePairValue": "XXX",
"ValuePairIncludeType":
true,
"Action": "A/D"
}],
"DistinctParameter": [{
"ParameterId": 12345,
"TypeText": "XXX",
"TypeId": 12345,
"Value": "XXX",
"String": "XXX",
"MeasureBasisTypeText":
"XXX",
Controlled Copy
Design Document
"MeasureBasisTypeId":
1234,
"IncludeTypeText":
"XXX",
"IncludeTypeId": 1234,
"HighValue": "XXX",
"LowValue": "XXX",
"ClassLevelTypeText":
"XXX",
"ClassLevelTypeId":
1234,
"ProcessNameText":
"XXX",
"ProcessNameId": 1234,
"MeasureDescText":
"XXX",
"MeasureDescId": 1234,
"ParameterValue":
"XXX",
"ParameterValueTypeText": "XXX",
"ParameterValueTypeId":
1234,
"IsMandatory": true,
"HasValuePairAssociation": true,
"ValuePairTypeText":
"XXX",
"ValuePairTypeId": 1234,
"ValuePairValue": "XXX",
"ValuePairIncludeType":
true,
"Action": "A/D"
}],
"BillablePayableActivities": [{
"BillablePayableActivityId": 12345,
"RateStructureNameType": "XXX",
"ActivityTypeText":
"XXX",
"ActivityTypeId": 12345,
"MeasureText": "XXX",
Controlled Copy
Design Document
"MeasureId": 1234,
"IsMandatory": true,
"Action": "A/D"
}],
"FuelSurchargeParameters": [{
"FuelSurchargeParameterId": 12345,
"ChargeBegin": "XXX",
"CreditBegin": "XXX",
"MPG": "XXX",
"BasePrice": "XXX",
"JurisdictionText": "XXX",
"JurisdictionId": 1234,
"RoundingFactorText":
"XXX",
"RoundingFactorId":
1234,
"PositionIndicatorText":
"XXX",
"PositionIndicatorId":
1234,
"ArgumentTypeText":
"XXX",
"ArgumentTypeId": 1234,
"ArgumentValue": "XXX",
"IsMandatory": true,
"Action": "A/D"
}]
}
Mass Update ApplyOutput:
{
"NodeName": "Mission Foods",
"NodeId": 12345,
"LevelId": 1,
"expanded": true,
"children": [{
"NodeName": "Mission
Foods - DALTX Contract",
"NodeId": 12345,
"LevelId": 2,
"expanded": true,
"children": [{
"NodeName":
Controlled Copy
Design Document
"Rule Name 1",
"NodeId": 12345,
"LevelId": 2,
"Parameters":
true,
"ExpressionText":
true,
"BillablePayableActivities": true,
"FuelSurchargeParameters": true,
"EffectiveStartDate": 123456789012,
"EffectiveEndDate": 123456789012,
"leaf": true,
"isValid": true,
"Page": "View /
Edit / Copy / Assign / MassUpdate",
"RuleDetails": [{
"AccountName": "Mission Foods DALTX",
"AccountId": 12345,
"LegalAgreementName": "Mission Foods
- DALTX Contract",
"LegalAgreementId": 12345,
"RuleName": "Rule Name 1",
"RuleId":
12345,
"CalculationMethod": "Stop",
"CalculationMethodValue": "XXX",
"EffectiveStartDate": 123456789012,
"EffectiveEndDate": 123456789012,
"RuleCategory": "DOE",
Controlled Copy
Design Document
"RuleClass": "XXX",
"HasParameter": true,
"HasBillablePayableActivities": true,
"HasExpressionText": true,
"HasFuelSurchargeParameters": true,
"TotalCount": 100,
"BasicInfo": [{
"RateStructureNameType": "XXX",
"MethodClassText": "XXX",
"MethodClassId": 1234,
"CreditFlag": true
}],
"Parameters": [{
"TypeText": "XXX",
"TypeId": 12345,
"Value": "XXX",
"String": "XXX",
"MeasureBasisTypeText": "XXX",
"MeasureBasisTypeId": 1234,
"IncludeTypeText": "XXX",
"IncludeTypeId": 1234,
"HighValue": "XXX",
Project ID:<Project ID. >
Controlled Copy
Design Document
"LowValue": "XXX",
"ClassLevelTypeText": "XXX",
"ClassLevelTypeId": 1234,
"ProcessNameText": "XXX",
"ProcessNameId": 1234,
"MeasureDescText": "XXX",
"MeasureDescId": 1234,
"ParameterValue": "XXX",
"ParameterValueTypeText": "XXX",
"ParameterValueTypeId": 1234,
"IsMandatory": true,
"HasValuePairAssociation": true,
"ValuePairTypeText": "XXX",
"ValuePairTypeId": 1234,
"ValuePairValue": "XXX",
"ValuePairIncludeType": true,
"Action": "A/D"
}],
"ExpressionText": "XXX",
"BillablePayableActivities": [{
"RateStructureNameType": "XXX",
"ActivityTypeText": "XXX",
"ActivityTypeId": 12345,
Controlled Copy
Design Document
"MeasureText": "XXX",
"MeasureId": 1234,
"IsMandatory": true,
"Action": "A/D"
}],
"FuelSurchargeParameters": [{
"ChargeBegin": "XXX",
"CreditBegin": "XXX",
"MPG": "XXX",
"BasePrice": "XXX",
"JurisdictionText": "XXX",
"JurisdictionId": 1234,
"RoundingFactorText": "XXX",
"RoundingFactorId": 1234,
"PositionIndicatorText": "XXX",
"PositionIndicatorId": 1234,
"ArgumentTypeText": "XXX",
"ArgumentTypeId": 1234,
"ArgumentValue": "XXX",
"IsMandatory": true,
"Action": "A/D"
}]
}],
"ErrorList": [{
Project ID:<Project ID. >
Controlled Copy
Design Document
"ErrorID":
1,
"ErrorMessage": "Message",
"ErrorSection": "BasicInfo / Parameter /
BillablePayableActivities /
FuelSurchargeParameters"
}]
}]
}]
}
BF2
/
rules/
mass
updat
e/
POS
T
CPABusRul
eAscReposit
ory
MassUpdate
RulesDTO
2 CCPABusRuleRepository
Controlled Copy
Design Document
3 ParameterRepository
Interface Method 1:
@Query("select param from Parameter param where ccpa.ccpaId = :ccpaId and ccpa.legArngId = :legArngId ")
List<Parameter>getAllParameters(@Param("ccpaId") Integer ccpaId, @Param("legArngId ") Integer legArngId);
4 ExpressionTextController
@Autowired
ExpressionTextServiceexpressionTextService;
@Autowired
ExpressionTextServiceexpressionTextService;
Controlled Copy
Design Document
public ExpressionTextDTOfetchParamsAndExprText
(@RequestBodySearchExpressionTextDTOsearchExpressionTextDTO) {
return expressionTextService.fetchParamsAndExprText(searchExpressionTextDTO);
}
5 ExpressionTextService
Service Method 1:
@AutoWired
CcpaBusRuleAscRepositoryccpaBusRuleAscRepository;
@AutoWired
ParameterRepositoryparameterRepository;
public ExpressionTextDTOsearchExpressionText(SearchExpressionTextDTOsearchExpressionTextDTO) {
ExpressionTextDTOexpressionTextDTO = new ExpressionTextDTO();
//get the list of ccpaId and legArgId from SearchExpressionTextDTO
List<CcpaBusRulAsc>ccpaList = ccpaBusRuleAscRepository.getAllCCPaBusRuleAsc(ccpaId,
legArgId);
//logic to find whether all the selected rules have the same expression text
expressionTextDTO.setHasCommonExprText(true|false); //based on the above logic
return
expressionTextDTO;
Service Method 2:
@AutoWired
CcpaBusRuleAscRepositoryccpaBusRuleAscRepository;
@AutoWired
ParameterRepositoryparameterRepository;
Controlled Copy
Design Document
public
ExpressionTextDTOfetchParamsAndExprText(@RequestBodySearchExpressionTextDTOsearchExpression
TextDTO) {
ExpressionTextDTOexpressionTextDTO = new ExpressionTextDTO();
//get the list of ccpaId and legArgId from SearchExpressionTextDTO
List<Parameter>parameterList = parameterRepository.getAllParameters(ccpaId, legArgId);
List<CcpaBusRulAsc>ccpaList = ccpaBusRuleAscRepository.getAllCCPaBusRuleAsc(ccpaId,
legArgId);
//logic to find the maximum common expression text
//call library to convert expression text to JSON
expressionTextDTO.setExprText(parameterList); //based on the above logic
expressionTextDTO.setParameterList(parameterList);
return
expressionTextDTO;
3 Integrations Details
<NA>
Controlled Copy
Design Document
Entity Library:
DTO Library:
Web Application:
Microservices Application:
EIP Integration Application using Camel:
Batch Application:
CI Job Names
<i>
Server Names
PID Details
DB Access Details
External System
Access Details
9.0 References
Reference to the Polarion link of the Architecture Document,
Project ID:<Project ID. >
Controlled Copy
Design Document
Controlled Copy
Design Document
10.0Change Log
Please note that this table needs to be maintained even if a Configuration Management
tool is used.
Version
Numbe
r
Changes made
V1.0
<First version>
V1.1
<If the change details are not explicitly documented in the table below,
reference should be provided here>
Page
no
V1.2
Effective
date
Changes effected
<If the change details are not explicitly documented in the table below,
reference should be provided here>
Page
no
Changed
by
Changed
by
Effective
date
Changes effected