This content applies solely to Connected Servicing, which must be purchased separately from the Appian base platform. This content was written for Appian 23.3 and may not reflect the interfaces or functionality of other Appian versions. |
Task due dates allow the Connected Servicing solution to quantitatively measure if Service Requests and their associated tasks are being completed on time. Further details and data about task due dates across an institution are displayed on the Reports tab.
By default, task due dates are calculated based on a service request's target completion date. This is set by the business owner in the Connected FS Settings site. A task's due date may also be calculated based on other associated due dates for that Service Request.
The examples in this section will follow adding After Created Date as a key date option.
Add a new row in the AS_SRQ_R_DATA
table with the following attributes:
1
2
INSERT INTO `AS_SRQ_R_DATA` (`R_DATA_ID`, `LABEL`, `TYPE`, `CODE`, `SORT_ORDER`, `ICON`, `COLOR`, `IS_ACTIVE`, `CREATED_BY`, `CREATED_DATETIME`, `MODIFIED_BY`, `MODIFIED_DATETIME`)
VALUES (NULL, 'SlaRuleType.lbl_AfterCreatedDate', 'SLA Rule Type', 'SLA_RULE_TYPE_AFTER_CREATED_DATE', NULL, '', '', '1', <username>, CURRENT_TIMESTAMP(),<username>, CURRENT_TIMESTAMP());
Create a new constant that's value is the code from the row in the database you added to AS_SRQ_R_DATA
in Step 1.
Create a constant called AS_SRQ_ENUM_SLA_RULE_AFTER_CREATED_DATE
with the value: SLA_RULE_TYPE_AFTER_CREATED_DATE.
Open the SlaRuleType bundle file in each language and add the labelKey in that you added to the AS_SRQ_R_DATA
in Step 1.
1
2
3
lbl_BeforeFundingDate=Before Funding Date
lbl_AfterFundingDate=After Actual Funding Date
!lbl_AfterCreatedDate=After Created Date
Open up the rule AS_TMG_BL_calculateTaskDueDateFromSlaDays
and add to the conditional if() statement the logic needed for the new key date and add the new date as a rule input.
AS_TMG_BL_calculateTaskDueDateFromSlaDays Rule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
if(
or(
rule!AS_CO_UT_isBlank(
ri!slaDays
),
rule!AS_CO_UT_isBlank(
ri!fundingDate
),
! rule!AS_CO_UT_isBlank(
! ri!createdDate
! )
),
null,
if(
ri!slaRule = cons!AS_TMG_ENUM_SLA_RULE_BEFORE_EST_FUNDING_DATE,
if(
ri!slaDayType = cons!AS_TMG_ENUM_SLA_DAY_TYPE_BUSINESS_DAYS,
workday(
ri!fundingDate,
- ri!slaDays
),
/*default is calendar days*/
ri!fundingDate - ri!slaDays,
),
! if(
! ri!slaRule = cons!AS_SRQ_ENUM_SLA_RULE_AFTER_CREATED_DATE,
! if(
! ri!slaDayType = cons!AS_SRQ_ENUM_SLA_DAY_TYPE_BUSINESS_DAYS,
! workday(
! ri!createdDate,
! - ri!slaDays
! ),
! /*default is calendar days*/
! ri!createdDate - ri!slaDays,
! ),
if(
ri!slaDayType = cons!AS_TMG_ENUM_SLA_DAY_TYPE_BUSINESS_DAYS,
workday(
ri!fundingDate,
+ ri!slaDays
),
/*default is calendar days*/
ri!fundingDate + ri!slaDays,
)
)
)
)
Add new rule input to the two rules that AS_TMG_BL_calculateTaskDueDateFromSlaDays
is dependent on and then pass in the appropriate logic.
The rules to update are:
AS_TMG_CDT_mapTemplateTaskToRuntimeTask
AS_TMG_UT_updateTasksDueDate
AS_TMG_CDT_mapTemplateTaskToRuntimeTask Rule
1
2
3
4
5
6
7
8
9
10
11
12
...
modifiedDatetime: null,
dueDate: rule!AS_TMG_BL_calculateTaskDueDateFromSlaDays(
slaDays: ri!templateTask.slaDays,
slaRule: ri!templateTask.slaRule,
fundingDate: ri!request.fundingDetails.estFundingDate,
slaDayType: ri!template.slaDayType,
! createdDate: todate(ri!request.createdDatetime)
),
slaDays: ri!templateTask.slaDays,
slaRule: ri!templateTask.slaRule
)
To remove a key date from the dropdown list in Connected FS Settings, update the 'isActive' column to false (0) in the AS_SRQ_R_DATA table for the corresponding row.
Modifying Key Dates