vision
payment.addSuccessor(finish, &quot;default&quot;); // Proceed to finish after payment

// Create the flow starting with reviewExpense
const expenseFlow = new Flow(reviewExpense);

// Initial shared state
const sharedState = {};

// Run the flow
expenseFlow.runAsync(sharedState).then(() =&gt; {
  console.log(&quot;Expense flow completed successfully.&quot;);
}).catch(error =&gt; {
  console.error(&quot;Expense flow execution failed:&quot;, error);
});
</code></pre>
<h3 id="flow-diagram">Flow Diagram</