- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello all,
We are on Australia release and I wanted to create control record from Smart Assessment Engine post automation once the assessment is submitted by Assessor. I have created a flow to trigger smart assessment when an entity is created or updated.
Also, I have created subflow to create control and it requires inputs such as Entity and Control Objective. I will be passing Control Objective as hard coded, but entity should be passed from Smart Assessment as on which trigger has raised against the entity. So I am trying to pass the entity from the smart assessment template, but it is not available.
Can you guide me how to pass smart assessment template input inside the subflow which triggers during post automation.
Summary what I am trying below:
1) Created Smart assessment with questions and answers
2) Created flow to trigger the assessment when the entity is created/updated
3) Created subflow to create control
4) Selected the subflow from step (3) in Automation
Challenge: I want to pass the Entity so that Control will be created on that entity.
Please let me know if anyone have tried this approach.
Thanks, Sunil Safare
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi again
Based on your response i think you are talking about this dropdown.
Select The Subflow
Note: In my case the input of my subflow was named "Control" as it is a control that needs to be passed to the subflow i selected. You should see "entity" (given the name of the subflow input variable that you defined in the subflow is "entity").
Now click on that wand-symbol right of that field:
Et voila!
You NEED to define Entity as assessment target in step one (createion of template) as mentiones earlier, to see the "scoped based" selection.
Dont forget to accept the answer if that helped 😉 Thanks
and "accepted solutions"This motivates others to take part, post solutions and find answers. Thanks! - Mat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
One more question!
Is there a way how many control records are created through smart assessment automation. I mean any m2m table in the system where we can know control and smart assessment are related.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
As you ususally us assessments to assess controls instead of creating them, there is no OOB m2m table fot that.
But you can build your own and create the entries in your subflow.
and "accepted solutions"This motivates others to take part, post solutions and find answers. Thanks! - Mat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Sunil25 - Instead of trying to pass the Entity directly from the Post Automation configuration, pass an available assessment context object (such as the Assessment Instance or Assessment Result, depending on what is exposed to your subflow) and then retrieve the associated Entity within the subflow logic.
Typical flow:
- Entity created/updated
- Flow launches Smart Assessment
- Assessment completed
- Post-assessment automation calls Subflow
- Subflow receives assessment context
- Subflow queries the assessment record to determine the source Entity
- Create Control against that Entity
Verify Available Data Pills
In your subflow definition:
- Add an input for the assessment context record (if available).
- Check the data pills exposed by Post Assessment Actions.
- Often the triggering entity is stored as a reference on the assessment instance/subject record and can be retrieved in a Flow Designer action or Script step.
Important Check
Make sure the subflow is properly linked to the Template Category, otherwise only limited inputs/actions may be exposed in the automation configuration. ServiceNow specifically requires subflows to be linked to the template category before they can be used in Post-Assessment Actions. [github.com], [servicenow.com]
If Entity Is Not Available at All
A workaround is to:
- Pass the Assessment Instance ID into the subflow.
- Use a "Look Up Record" step or Script step.
- Read the entity reference from the assessment instance table.
- Use that Entity sys_id when creating the Control record.