Preview Mode
Testing workflows in the browser
In the Liberate platform, Preview Mode offers developers a convenient way to test workflows directly in the browser without the need to trigger them programmatically. It allows for real-time execution of workflows and provides a comprehensive view of the session call flow and the evolving context throughout the workflow steps. This developer documentation provides an overview of Liberate Preview Mode and explains how it can be used effectively.
Accessing Preview Mode:
To access Preview Mode in the Liberate platform, simply click on the play icon located in the left navigation bar. This will open up the Preview Mode interface, where you can test and validate your workflows before deploying them to QA or production environments. Preview Mode provides a safe and controlled environment for testing and refining your workflows.
Workflow Testing in Preview Mode:
Once in Preview Mode, you can test your workflows by entering the starting JSON payload that your workflow expects as input. This allows you to simulate the flow of data and events through the workflow steps. By providing the initial payload, you can observe how the workflow progresses, track the execution path, and view the evolving context as it changes throughout the workflow.
Real-Time Session Call Flow:
Preview Mode provides a real-time view of the session call flow, allowing you to visualize the execution path of the workflow. As the workflow progresses, you can see the sequence of tasks, connections, decision tables, and other workflow components being executed. This real-time session call flow provides valuable insights into the behavior of the workflow and helps in identifying any potential issues or areas for improvement.
Monitoring Context Changes:
One of the key advantages of Preview Mode is the ability to monitor the changes in the context object as the workflow advances. The context object contains the relevant data and variables utilized during the workflow execution. By observing how the context evolves, you can ensure that the workflow is correctly processing and manipulating the data according to your expectations.
Tips for Effective Testing:To make testing in Preview Mode more efficient, you can leverage the Liberate notes feature. Use this feature to save sample payloads for different scenarios that you want to test in your workflow. By storing sample payloads in notes, you can easily access and reuse them for future testing. This can be particularly useful when you want to examine specific variations or edge cases within your workflow.
Please note that in the near future, Liberate will introduce the ability to save sample payloads directly within the platform, streamlining the testing process even further.
Updated 9 months ago
