FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/workflow / next

Function: next()

next(name, params?): NextWorkflowInstruction

Mark the current step as done and create a next runnable step.

Parameters

name

string

Target step name.

params?

unknown

Params passed to the target step.

Returns

NextWorkflowInstruction

Example

import { next } from '@faasjs/workflow'

async function reserveInventory({ params }) {
  await reserveInventoryForOrder(params.orderId)

  return next('capturePayment', {
    orderId: params.orderId,
  })
}