Defining multiple handlers inside the workflow code is really cluttering the workflow code. Is there a way we can just define it outside the workflow code and associate it with the workflow.
Current way:
export async function workflowCode() {
wf.setHandler(incomingSignal, data => {
data = data;
});
}
is there a better way to define handlers so that it doesn’t clutter the workflow code
Proposed way:
wf.setHandler(incomingSignal, associatedWorkflow, data => {
data = data;
});
export async function workflowCode() {
}
Any help is highly appreciated!