Create or retrieve an assessment via workflows
In Collibra 2024.05, we launched a new user interface (UI) for Collibra Platform! You can learn more about this latest UI in the UI overview.
Use the following options to see the documentation in the latest UI or in the previous, classic UI:
You can call the Assessments API within your workflows to
The following predefined Java delegates are available:
- ConductAssessmentDelegate: Allows you to create an assessment in the Draft status via a workflow.
- GetAssessmentDelegate: Allows you to retrieve the details of an assessment via a workflow.
- RetakeAssessmentDelegate: Allows you to trigger a retake of an assessment via a workflow based on certain conditions (for example, when an assessment is rejected).
ConductAssessmentDelegate
Class: com.collibra.assessments.api.v1.workflow.delegate.ConductAssessmentDelegate
The following table contains the properties of the input and output parameters for ConductAssessmentDelegate.
The following steps describe how to integrate ConductAssessmentDelegate into a workflow.
-
On the main toolbar, click
→ Workflow Designer.
The Workflow Designer page opens. - Create a process.
The process editor page opens. - On the canvas, click the start event.
Attributes for the start event are shown in the right pane. - In the Details section, click Form properties.
The Form properties dialog box appears. - Click Add item.
- Enter the information for the first input parameter from the table in the Properties section above.
- Repeat steps 5 and 6 for each input parameter.
- Click OK.
- Drag the following activities from the palette in the left pane to the canvas:
- Service task
- Script task
- End event
- On the canvas, add the following sequence flows:
- From the start event to the service task.
- From the service task to the script task.
- From the script task to the end event.
- Click the service task.
Attributes for the service task are shown in the right pane. - In the Details section, in the Class field, enter
com.collibra.assessments.api.v1.workflow.delegate.ConductAssessmentDelegate
.Tip This class enables the service task to call ConductAssessmentDelegate. - Click the script task.
Attributes for the script task are shown in the right pane. - In the Details section, click Script.
The Script dialog box appears. - In the dialog box, enter the following.
Copy
def delegateResults = execution.getVariable("result")
println "The Java Delegate service task returned the following results: " + delegateResults - Click OK.
- To save the workflow, in the process editor menu bar, click
.
GetAssessmentDelegate
Class: com.collibra.assessments.api.v1.workflow.delegate.GetAssessmentDelegate
The following table contains the properties of the input and output parameters for GetAssessmentDelegate.
Parameter ID |
Type | Description | Example |
---|---|---|---|
Input | |||
assessment_id | String | ID of the assessment. | 002c7cac-92d0-451e-b979-8ef0857a34b4 |
assessment_review_id | String | ID of the assessment review asset. | 9e6ba6fa-ae24-41c8-9b42-08e7c4231689 |
Output | |||
result | Map<String, Object> | The assessment. |
Copy
|
The following image shows an assessment approval workflow that uses GetAssessmentDelegate to automatically approve an assessment based on certain answers.
The workflow uses GetAssessmentDelegate to fetch the details of the assessment when the assessment is submitted.
GetAssessmentDelegate expects the workflow to have either the assessment_id parameter or the assessment_review_id parameter as a string in the form properties of the workflow.
The following is an example of how the assessment_id parameter can be declared as a form property within the workflow.
<activiti:formProperty id="assessment_id" name="Assessment ID" type="string" default="725ca8b5-8a8d-40fa-91b9-3323b70ed524" readable="false"/>
The following is an example of how the assessment_review_id parameter can be programmatically declared.
execution.setVariable("assessment_review_id", item.id.toString())
To call the Assessments API, GetAssessmentDelegate uses the declared value 725ca8b5-8a8d-40fa-91b9-3323b70ed524
or item.id.toString()
. If the call is successful, the assessment details are stored in a result variable that can be accessed in the next task, Check Answers. The answers can then be used for processing and automating business decisions.
RetakeAssessmentDelegate
Class:com.collibra.assessments.api.v1.workflow.delegate.RetakeAssessmentDelegate
The following table contains the properties of the input and output parameters for GetAssessmentDelegate.
Parameter ID | Type | Description | Example |
---|---|---|---|
Input | |||
assessment_id Note This parameter is required. | String | ID of the assessment. | 002c7cac-92d0-451e-b979-8ef0857a34b4 |
owner_id | String | ID of the Collibra user to be used as the owner of the new (retaken) assessment. If this value is not provided, the owner of the original assessment is used. | 0e787414-fd78-48a0-bfdd-69411b26c65b |
Output | |||
result | String | ID of the new assessment. | 60dfe2b6-0215-4a30-86dd-4ee235a1821e |
The following example shows how RetakeAssessmentDelegate can be used in a workflow to make the process of retaking a rejected assessment more efficient.
Suppose that a user submits an assessment for review. Once an assessment is submitted, it can't be edited. If the reviewer finds missing or incorrect information in the assessment, they provide feedback and reject the assessment. Typically, this ends the review lifecycle. The user would need to manually go to the original assessment and retake it to address the feedback.
You can, however, integrate RetakeAssessmentDelegate into the workflow such that a task is automatically created for the user to retake the assessment when their assessment is rejected.
The user clicks the task and is taken to the Assessment Review asset page containing a link to a draft version of the assessment.
The draft already contains the original content, so the user doesn't need to start from scratch. This is equivalent to retaking the original assessment. The user can simply update the draft based on the reviewer's feedback and submit it again for review. The reviewer then reviews and approves the new assessment, ending the review lifecyle more meaningfully.
With this updated workflow, the user doesn't need to recreate the original assessment or manually go to the original assessment to retake it. Instead, they can directly retake the assessment via the task. The updated workflow streamlines the process of retaking and resubmitting assessments, making it easier for users to address feedback.