Trigger a flow using an onAfter transform script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 06:30 AM
I am using the system import sets > load data to import and transform data to a table. I need a flow to run that will grant roles to the users based on field selections from the import. The import and transform are working fine, and the flow works when i manually trigger it, however the flow will not automatically trigger after the import creates the new table records. After looking at some article it looks like this is expected functionality from ServiceNow (https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0957669).
All that to say, the article recommends triggering the flow when the transform map executes. Is it possible to trigger a flow using an onAfter Transform Script? If so can someone please provide an example of this to help me out?
Thank you in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 07:38 AM - edited 07-03-2024 07:46 AM
Have you just tried scripting it?
If you use create code snippet option that can be found on the Flow you want to call (in Workflow Studio/Flow Designer More menu) which much quicker than coding from scratch 🙂 For a Transform Script remember to copy the Server version NOT the Client version and paste that into your After Script with the correct inputs.
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2024 09:17 AM - edited 07-03-2024 09:19 AM
@Paul Curwen do you know what type of inputs can be / should be assigned on line 5? I need this flow to fire for each new record being inserted on the table.