Launching assessments
Can anyone show me a code example of calling the API to launch an assessment?
Donna Pace
Posted 1 year ago · Edited 1 year ago·Last reply 1 year ago
2 comments
Can anyone show me a code example of calling the API to launch an assessment?
Eleftheria Makrydaki
·1 year agoTo call the API to launch an assessment, you can use the
ConductAssessmentDelegatein a workflow. Here's an explanation of how you can set this up:Workflow Setup:
In your workflow designer, create a new process and add a start event.
Define the necessary form properties for the assessment, such as
template_id,name,asset_id,owner_id,assignees_users_ids,assignees_groups_ids, andis_visible_to_everyone.Service Task:
Add a service task to your workflow and configure it to use the
ConductAssessmentDelegateclass:com.collibra.assessments.api.v1.workflow.delegate.ConductAssessmentDelegate.This service task will initiate the assessment using the provided parameters.
Script Task:
Add a script task to handle the results returned by the service task. You can access the result using a script like:
def delegateResults = execution.getVariable("result")println "The Java Delegate service task returned the following results: " + delegateResultsEnd Event:
Finally, add an end event to complete the workflow.
This setup will allow you to launch an assessment using the API within a workflow environment. Hope this helps!
Thanks you very much!
Donna Pace
OP1 year agoA little more info, we want to launch the assessment from a workflow.