Pathches After the Release
- Task distribution config is not getting saved when 2 tasks have the same
taskDefinitionId
Highlights
Lifecycle hooks config for all kinds of inbox
On Init:
- Triggered when the inbox items (case and task instances) are fetched from the backend. Use this to modify the inbox data before rendering.
- Parameters passed to the custom code:
data: The inbox data fetched from the backend.
After View Init:
- Triggered after the inbox items are rendered on the UI. Use this to perform any post-rendering operations.
- Parameters passed to the custom code:
data: The inbox data fetched from the backend.element: Reference to the DOM instance of the inbox table.
Note: All the parameters passed to the custom code can be seen by logging the
paramsobject in the console like this:console.log(params);
Style Inbox Table Cells Based On the value
- Every cell in the inbox table can be styled based on the value of the cell using the css editor using the
data-prefix - The format for selecting a cell is =>
[data-column-name="column name"][data-value="column value"] - To select one of the default inboxes use =>
.inbox-myTasks,.inbox-groupTasks,.inbox-teamTasks - To select a custom filter use =>
.inbox-{inbox name or custom filter name (spaces replaced with '-'s} - The format for selecting inbox is =>
.inbox-{inbox name or custom filter name (spaces replaced with-s} - To select a column header use =>
.{inbox-selector} th[data-column-name="column name"]
/* .inbox-{inbox name or custom filter name (spaces replaced with `-`s} */
.inbox-myTasks [data-column-name="Age"][data-value="2d"] {
background-color: red;
}
/* For enquiry inbox */
.enquiry-inbox-Default
[data-column-name="Status"][data-value="Pending"] {
background-color: red;
}
/* For admin inbox */
.admin-inbox-Default [data-column-name="Status"][data-value="Pending"] {
background-color: red;
}
NOTE: You might have to use
!importantto override the default styles.
New Triggers For Page
Before Init
- Triggered before the page design json is parsed to create the page UI.
- Use this to modify the page design json before rendering.
- Parameters passed to the custom code:
rendererJSON: The page design json.
On Change
- Triggered when the value of a form field changes, after the bound variables (
co,localetc) are updated and the page is validated - Use this to perform any operations when the value of a form field changes.
- Parameters passed to the custom code:
leafInstance: The leaf instance of the form field whose value changed.rendererInstance: The renderer instance on the page:
const { leafInstance, rendererInstance } = params; const value = leafInstance.value; const rendererForm = rendererInstance.get(); rendererForm.value; // The value of the form fields on the page rendererForm.valid; // The validity of the page/renderer rendererForm.errors; // The errors on the page/renderer
Ability to Add Custom Validation For A Form Field (SDK)
ap.renderer.validations.add(leafId, keyName, functionRef, validateOnAdd);
/**
* @param {string} leafId - The leaf id of the form field (can be copied from the attribute window header in workflow studio).
* @param {string} keyName - The unique name for the validation function. ex. 'validateAge', 'validateCompanyMailId' etc
* @param {function} functionRef - The callback function to be executed for validation. It will be called with the value of the form field as the first argument.
* The function should return an object with the following structure:
* {
* valid: true/false, // true if the validation passes, false otherwise
* error: 'Error message to be shown if the validation fails' // The error message to be shown if the validation fails
* }
* @param {boolean} validateOnAdd - If true, the validation function will be executed when the form field is added to the form and error will be shown if the validation fails.
*/
// Example:
ap.renderer.validations.add(
"leafId",
"validateIfAdult",
(leafInstance) => {
if (leafInstance.value < 18) {
return {
valid: false,
error: {
message: "Age should be greater than 18",
},
};
}
return {
valid: true,
};
},
true,
);
Ability to Configure Typing in the input of the Datepicker component
- New attribute
Allow Inputadded to the Datepicker component to allow typing in the input field. - If
Allow Inputis set totrue, the user can type in the input field to select the date.
Ability to configure separator for the Datepicker component
- New attribute
Separatoradded to the Datepicker component to configure the separator for the date. - The default separator is
/, and you can change it to any other separator like-and.
Database Migration (Before Upgrading)
To apply the database migration, run the following script:
Env Variable Changes
alpha-admin-service
| Key | Description | Mandatory |
|---|---|---|
| BPM_SERVER_BASE_URL | Base URL of the alpha-bpm-service. Required for getting the error flow process variables in the Admin “Re-Attempt” inbox |
Yes |
| ALPHA_BPM_CLIENT_ID | client id configured in the alpha-bpm-service. Usually, it is the common client id for all the services |
Yes |
| ALPHA_BPM_CLIENT_SECRET | client secret configured in the alpha-bpm-service. Usually, it is the common client secret for all the services |
Yes |
| ALPHA_DASHBOARD_URL | URL of the dashboard service. Added in this release | No |