Workflow().broadcastEventToCurrentsContexts vs Workflow().runFlows

othman
Kilo Contributor

I want to know if there is any difference in behavior between these 2 objects , or any criteria so that we choose one over the other :

new Workflow().broadcastEventToCurrentsContexts(gr, 'update', null);   VS new Workflow().runFlows(gr, "update");

1 ACCEPTED SOLUTION

awessel
Kilo Guru

I believe these functions are doing the exact same thing. Both will essentially broadcast the "update" event to the workflow which will in turn trigger the workflow to start running again. This is typically done when you have a Wait For Condition that is checking another table or some non-standard field.



With that said, I'd recommend using broadcastEventToCurrentsContexts as this is what the OOB business rules are using in more recent versions.


View solution in original post

2 REPLIES 2

awessel
Kilo Guru

I believe these functions are doing the exact same thing. Both will essentially broadcast the "update" event to the workflow which will in turn trigger the workflow to start running again. This is typically done when you have a Wait For Condition that is checking another table or some non-standard field.



With that said, I'd recommend using broadcastEventToCurrentsContexts as this is what the OOB business rules are using in more recent versions.


@awessel- Is there an equivalent for triggering a Flow to start running again?