Workflow Events - Where to register and where is its log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 01:28 PM
Hello,
I just recently started using Workflow events in order to pause a workflow with a Wait for WF Event activity. I have been able to successfully get this to work with the expected behavior, but I do not think I understand completely what is going on. Some insight/help would be greatly appreciated.
Context:
- Business rule listening to the Catalog Task [sc_task]
- After State changes to Closed Complete, execute Advanced code
- Code broadcasts 'myevent.testing.wfevent' to the proper workflow
Code:
function triggerWFEvent(event, gr_RITM){
//parameter is a glide record
var wf = new Workflow().getRunningFlows(gr_RITM);
while(wf.next()) {
new Workflow().broadcastEvent(wf.sys_id, event);
}
}//end triggerWFEvent()
The above code works, as it triggers the right activity in the correct workflow.
Questions:
- I believe you could broadcast an '' empty event, because the function has some handler that will still kick off the notice to the workflow. But I dont want that, I want to broadcast a specific event. I used the Event Registry to register my event ('myevent.testing.wfevent'). Do I need to register my event in the Event Registry or is there another place for Workflow events?
- I tried looking in the Event [sysevent] and the Workflow Executing Activity [wf_executing] tables but I was not able to see my event at all. Where can I see it? What am I doing wrong?
Any help, insight would be greatly appreciated, thank you!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 02:07 PM
I dont think you need an event registry record for this. this event is only an identification of an action. Only when you call this event from a business rule or UI action, you actually calling a script include and directly triggering the workflow using its sys_id. So are actually not creating a event in the event log to process is asynchronously. It is actually a synchronous event, which is triggering the workflow directly.
Please mark this response as correct or helpful if it assisted you with your question.