Laminar
  • Laminar
  • Platform
    • Overview
    • Getting Started
    • Advanced
      • Configurations
      • HTTP Request Batching
      • Workflow Exit Points
      • Invoke Secondary Workflows
      • Managing Notifications
    • Best Practices
    • Keywords
      • lam.resolveThenExecute
      • lam.exit
      • lam.execute
      • lam.asyncExecute
      • lam.httpRequest
      • lam.httpRequests
  • Concepts
    • Workflows
      • Global Workflow Object
    • Flows
      • Flow Types
        • HTTP Request
        • Data Transformations
      • Flow Runs
      • Supported Languages
    • API Key
    • Configurations
    • API
      • Reference
        • Workspaces
          • Issues
          • Users
          • Invitations
            • Decline
            • Accept
            • Received
            • Created
          • Workflows
          • Flows
          • Auth credentials
          • Api keys
          • Api descriptions
        • Workflow
          • Execute
            • External
          • Flows
          • Executions
        • Users
        • Flows
          • Runs
          • Versions
          • Stats
          • Recent runs
          • Read
        • Configurations
          • Properties
          • Flow credentials
          • Workspace
        • Auth credentials
        • Api descriptions
        • Api keys
        • Transform
          • Test
        • Lami
          • Public
          • Direct
        • Auth
          • Signin
          • Register
          • Refresh
          • Me
          • Users
            • Password
    • Changelog
  • External Links
    • Book a Demo
    • Playground
    • Sign In
  • Specification
Powered by GitBook
On this page
  • Functionality
  • Invocation
  • Examples

Was this helpful?

  1. Platform
  2. Keywords

lam.resolveThenExecute

Learn about the resolveThenExecute keyword

Functionality

The resolveThenExecute keyword resolves a pending request with the contents from lam.result and then executes a new workflow. This enables asynchronous workflow execution by immediately responding to webhook requests while continuing processing.

Invocation

Data transformation must output:

{
  "lam.resolveThenExecute": {
    "lam.workflowId": 52,
    "lam.payload": { /* payload data */ },
    "lam.result": { /* result data */ }
  }
}
Key
Description
Type

workflowId

The workflow ID to invoke after resolving pending request

Integer

payload

The payload to pass to the workflow

Object

result

The result to resolve the pending request with

Object

Examples

(payload) => {
  const { step_2, input } = payload;
  const { Recipient, PackagesInfo } = input;
  
  const packages = PackagesInfo.Packages.map(pkg => ({
    address_1: Recipient.Address1,
    address_2: Recipient.Address2,
    address_city: Recipient.City,
    address_state_id: Recipient.CountryStateCode,
    address_country_id: Recipient.CountryCode,
    address_zip: Recipient.PostalCode,
    tracking_number: pkg.PreAssignTrackingNumber.TrackingNumber
  }));

  return {
    "lam.resolveThenExecute": {
      "lam.workflowId": 52,
      "lam.payload": {
        "packages": packages
      },
      "lam.result": step_2.data
    }
  };
}

In this example we start workflow 52 with our packages array and resolve the pending request with our $result.

PreviousKeywordsNextlam.exit

Last updated 1 month ago

Was this helpful?