> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/solution-editor/logic/stop.md).

# 停止

停止ステップとは、ソリューション内の任意のステップで、処理の実行を停止することができるステップです。

<figure><img src="https://files.readme.io/13094da-image.png" alt=""><figcaption></figcaption></figure>

## **設定**

実行ステータス&#x3067;**「成功にする」**&#x3092;選択すると、その実行履歴の状態は成功となります。

<figure><img src="https://files.readme.io/4e82bc0-image.png" alt="「成功にする」を設定"><figcaption><p>「成功にする」を設定</p></figcaption></figure>

<figure><img src="https://files.readme.io/da0dab6-image.png" alt="実行ステータスが「成功」で停止"><figcaption><p>実行ステータスが「成功」で停止</p></figcaption></figure>

実行ステータス&#x3067;**「失敗にする」**&#x3092;選択すると、その実行履歴の状態は失敗となります。

**「メッセージ」**&#x306B;は、停止ステップにより実行失敗となった際に出力するメッセージを指定できます。

<figure><img src="https://files.readme.io/ad6d8dd-image.png" alt="「失敗にする」と、メッセージを設定"><figcaption><p>実行ステータスを「失敗」にしてメッセージを設定</p></figcaption></figure>

<figure><img src="https://files.readme.io/e094e6a-image.png" alt="実行ステータスが「失敗」で停止 &#x26; メッセージが表示"><figcaption><p>実行ステータスが「失敗」で停止 &#x26; メッセージが表示</p></figcaption></figure>

## **注意すべきケース**

メッセージの記述や処理に誤りがある場合、他のステップと同様に、**停止ステップ自体がエラー**となります。

以下のような設定を行った場合、実行処理は停止ステップの箇所で停止しますが、停止ステップの処理として停止するわけではなく、**設定不備によるエラー**として停止します。

<figure><img src="https://files.readme.io/559c3f3-image.png" alt="設定不備の例：sum関数が正しく入力されていない"><figcaption><p>設定不備の例：sum関数が正しく入力されていない</p></figcaption></figure>

<figure><img src="https://files.readme.io/bf8593e-image.png" alt="エラーによる意図しない停止"><figcaption><p>エラーによる意図しない停止</p></figcaption></figure>

従って上記のような設定不備がある場合に\
[エラー監視ステップ](/solution-editor/logic/error-monitoring.md)の内側で停止ステップを利用すると、停止ステップの箇所で停止されないことになります。

<figure><img src="https://files.readme.io/5788c8b-image.png" alt="エラー監視ステップの内側に、設定不備のある停止ステップを配置"><figcaption><p>エラー監視ステップの内側に、設定不備のある停止ステップを配置</p></figcaption></figure>

<figure><img src="https://files.readme.io/cd2f333-image.png" alt="停止ステップの箇所（4番目）で停止せず、「エラーならば」以降（6番目）へ進行"><figcaption><p>停止ステップの箇所（4番目）で停止せず、「エラーならば」以降（6番目）へ進行</p></figcaption></figure>

これは、設定不備によるエラーをエラー監視ステップが捕捉し、**「エラーならば」の内側のステップが実行される**ためです。

エラー監視ステップと併用する場合は、設定に不備がないかを十分にご確認ください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-embed.anyflow.jp/solution-editor/logic/stop.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
