logo

NJP

91. broadcastEvent in Workflow

Import · Jun 08, 2024 · article

Explanation — The broadcast event sends the specified event (message) into the workflow context to pass along to the executing activities.

The typical use of this method is to enable activities that wait for some action to occur before proceeding.

Syntax — broadcastEvent(String contextId, String eventName)

For Example —

//where the current is a task record with a workflow context

var wf = new Workflow().getRunningFlows(current);
while(wf.next()) {
new Workflow().broadcastEvent(wf.sys_id, ‘resume’);
}

View original source

https://medium.com/@LearnITbyPrashant/91-broadcastevent-in-workflow-c367dfb0085a?source=rss-d005fc598f0a------2