 prepAsync(sharedState: any): Promise&lt;void&gt; {
    // Preparation logic for NodeB
  }

  public async execAsync(_: void): Promise&lt;void&gt; {
    // Execution logic for NodeB
  }

  public async postAsync(sharedState: any, _: void, __: void): Promise&lt;string&gt; {
    // No further nodes to transition to
    return DEFAULT_ACTION;
  }
}

// Instantiate nodes
const nodeA = new NodeA();
const nodeB = new NodeB();

// Define the flow connections
nodeA.addSuccessor(nodeB, &quot;default&quot;);

// Crea