# Long Running Process Shapes

Shapes for implementing Long Running Processes allows you to put the Process on hold for as long as necessary, and resuming as soon as the schedule or external signal resumes the Process again. They are generally used to implement business processes in one go, presenting the whole flow from start to finish without needing to jump and search between Processes for that one ID.

When the Process is paused on a **Checkpoint** shape, the data needed to continue the Process execution later is stored to a database, and the execution of the Process optionally halts until resumed. When it happens, the state is loaded from the database and the Process is resumed, allowing it to continue as if nothing happened during the wait time. The Process execution itself is completely dormant during this time and does not consume any resources other than storage for the state.

<figure><img src="https://3198802258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H5SQ92uIfBOYNIeoUAc%2Fuploads%2FQD4a4lRdJnCd8HCfcUHs%2Fscreenshot-rocks%20-%202025-10-20T110912.348.png?alt=media&#x26;token=ef9e6463-b28a-45e5-b2e5-0d53e8587af8" alt=""><figcaption><p>Long Running Process can present a whole business process at once.</p></figcaption></figure>

In order to resume the Process's execution, you can use either **Scheduled Resume** shape within the Process to continue after a specified time duration, or a **Signal Resume** from another Process that receives data from external systems and can signal the paused Process with a Correlation ID to continue.&#x20;

## Checkpoint

Checkpoint shape is used to store the state of the Process into the Agent database and optionally pause the Process, causing the execution to halt until resumed. Resuming the Process causes the Agent to load the stored data of the Process and resume its execution as if nothing had happened in between.

If a Checkpoint shape is used but the Process execution is chosen to continue immediately, the state of the Process is still saved. This allows resuming and retrying the following execution path later on, if the Process is put to wait for a scheduled resume using Scheduled Resume shape. If an error occurs after a checkpoint, a Frends developer or IT Support personnel can also resume the Process manually from the Frends UI after the error is corrected.

<figure><img src="https://3198802258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H5SQ92uIfBOYNIeoUAc%2Fuploads%2FhONtvZujR94voy0cAZba%2Fimage.png?alt=media&#x26;token=99d8eefe-a136-40e8-b94e-a4a907509757" alt=""><figcaption><p>Checkpoint provides state storing capabilities for error handling and recovery.</p></figcaption></figure>

## Scheduled Resume

Scheduled Resume shape allows the Process to enter into a paused state in combination with the Checkpoint shape, where it will resume from after the scheduled time arrives.&#x20;

With some Process logic, you can also iteratively wait for a specified time, check a condition and possibly wait again until the condition allows the continuation of the Process.

<figure><img src="https://3198802258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H5SQ92uIfBOYNIeoUAc%2Fuploads%2FruunKFyWUg4TqL9e0rzx%2Fscreenshot-rocks%20-%202025-10-20T103419.505.png?alt=media&#x26;token=1a3369cb-0c96-43e8-baed-26e36e1095d7" alt=""><figcaption><p>Scheduled Resume pausing the Process until specified date.</p></figcaption></figure>

## Signal Resume

Signal Resume shape allows resuming another Process by sending a signal with the matching Correlation ID field.&#x20;

<figure><img src="https://3198802258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H5SQ92uIfBOYNIeoUAc%2Fuploads%2Fdy5Lbuafe6xBtNu2d8MA%2Fimage.png?alt=media&#x26;token=fc36125c-de9e-4bb3-af35-dde61b97f5df" alt=""><figcaption><p>Simple Process to resume a paused Process by stored ID.</p></figcaption></figure>

For example, it would be possible to have a Long Running Process to handle a complete business process in tandem with external systems, and another Process that receives status updates from the external systems and can resume the Long Running Process whenever an update comes in.&#x20;

This allows for a separate, centralized polling or webhook Process while keeping the Long Running Process easier to understand by business personnel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frends.com/reference/shapes/long-running-process-shapes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
