LetsFlow
  • Introduction
  • Tutorial
    • The basics
    • A handshake
    • A conversation
    • A proper introduction
    • Group meeting
    • Quote
  • Cookbook
  • ENGINE
    • Installation
    • Authentication
    • API
    • Services
      • Configuration
      • Messaging
        • ZeroMQ
        • AMQP 0-9-1
        • Webhook
      • Engine service
  • Integration
    • Frontend
      • React
      • Angular
      • Vue
      • Svelte
    • Backend
  • Reference
    • Scenario
      • Actor
      • Action
        • Update instruction
      • State
        • Transition
          • Log
        • Notify
      • Data function
    • Schema
    • Process
      • Current state
      • Previous log
      • Prediction
      • Events
        • Instantiate event
        • Action event
        • Timeout event
  • Libraries
    • Core library
    • JMESPath
    • Test suite
      • Given
      • When
      • Then
        • Assert state
        • Assert actor
        • Assert variable
        • Assert service
        • Assert event
      • Customize
  • Advanced topics
    • Deep integration
    • Decentralized workflows
    • Custom JMESPath functions
    • Custom YAML tags
Powered by GitBook
On this page
  • Running state
  • End state
  • Process result
  • State property
  • Instructions

Was this helpful?

  1. Libraries
  2. Test suite
  3. Then

Assert state

PreviousThenNextAssert actor

Last updated 22 days ago

Was this helpful?

Running state

Assert that the process is in the expected state.

Then the process is in "waiting_for_client"
Then the "main" process is in "waiting_for_client"

End state

Check if the process has ended. Typically, you want to specify which end state.

Then the process ended
Then the process ended in "success"
Then the "main" process ended in "success"

Process result

You can also check the with the same assertion.

Then the process ended with "Foo Bar"
Then the process ended in "success" with "Foo Bar"

Then the process ended with:
   | document    | somedoc.pdf |
   | description | Foo Bar     |
Then the process ended with:
   """yaml
     documents:
       - quote.pdf
       - plan.pdf
   """

If the result schema is a string, number, or boolean, it can be given inline. You can use a data table, if the response is a simple object with a shallow structure. For arrays and more complex objects, use YAML or JSON.

State property

Then the state description is "Waiting for the client"
Then the state description of the "main" process is "Waiting ..."

Then the state instructions are:
  | admin  | Wait for the client              |
  | client | Please choose one of the options |

You can specify the value inline, as data table, or as YAML / JSON.

Instructions

Check the instructions for a specific actor in the current state.

Then actor "admin" has the instruction "Wait for the client"
Then actor "client" has instructions:
  """
  Please review the quote.
  The total amount is €100.
  You can accept or reject the offer.
  """

You can specify the instructions inline or as doc string.

Assert that a property of the current state has the expected value. This is particularly useful for .

data functions
process result