I have a custom object that being passed around. I want to show a toast when a workflow is done. I am looking for some thing like
object.addEvent("workflowIsDone", ()=> {
toast.open();
});
and when the workflow ends:
object.fireEvent("workFlowIsDone")
I was wondering if some one can tell me how to do it in Javascript