- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
01-23-2025 03:29 AM - edited 01-23-2025 04:21 AM
Had an AH HAH! moment yesterday I'd like to share.
I had always wished Flow could trigger based on a sysevent, but I never realized how simple it was until now.
This article will help you trigger flows based on events usually created by gs.eventQueue or gs.eventQueueScheduled.
LAUNCH A FLOW BASED ON AN EVENT
I suddenly realized. An event isn't anything special. Its just another record.
So I just looked for a record Created in the sysevent table. Then just conditioned the name of the event I might be looking for.
BUT WHAT IF THE EVENT IS SCHEDULED?
You've got two options. The first option is my favorite, and credit to @Chris Helming for pointing it out.
Option 1 - Create OR Update, but wait for State to be Processed.
For events that have a process_on in the future, the state will change to processed on that date/time.
Option 2 - Trigger but wait until Process On
In this case the event triggers the flow (even if its early) and its first action is to wait.
Wait until when? Until 100% of the time between now and the Process On date/time is consumed.
WHICH OPTION IN WHAT CIRCUMSTANCES?
If all action is being taken at the Process On date, then I'd use Option 1.
In some scenarios you may want SOME flow to start right away, and other parts to happen on the Process On date. In that case I'd use Option 2.
For the giggles
Remember that Washington release a Flow Action to Fire an Event, and you can easily make one of your own that could produced scheduled events.
So now you can both fire and trigger based on sysevents. AWESOME!
- 2,168 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I don't see sysevent listed. I'm on Washington. What gives?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@thomaskennedy - that's the AH HAH! moment. It doesn't need its own special lookup.
I just did a "Look Up Record" against the sysevent table.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@thomaskennedy i'm not sure if this has been solved for you but there is a sys property called sn_flow_designer.allowed_system_tables . if you add sysevent table here it will show up as selectable. I tested it on Washington as well.