diff --git a/docs/english/guides/steps-from-apps.md b/docs/english/guides/steps-from-apps.md index b08f21116..098faf837 100644 --- a/docs/english/guides/steps-from-apps.md +++ b/docs/english/guides/steps-from-apps.md @@ -22,8 +22,6 @@ A step is made up of three distinct user events: All three events must be handled for a workflow step to function. -Read more about steps from apps in the [API documentation](/legacy/legacy-steps-from-apps/). - ### Slack app configuration To enable Steps from Apps, visit the [Slack app settings page](http://api.slack.com/apps), choose the app you're working on, and go to **Features** > **Workflow Steps** on the left pane. There are two things to do on the page. @@ -64,14 +62,12 @@ app.step(step); --- ## Adding or editing Steps from Apps -When a builder adds (or later edits) your step in their workflow, your app will receive a [`workflow_step_edit`](/legacy/legacy-steps-from-apps/legacy-steps-from-apps-workflow_step_edit-payload) event. The `edit` callback in your `WorkflowStep` configuration will be run when this event is received. +When a builder adds (or later edits) your step in their workflow, your app will receive a `workflow_step_edit` event. The `edit` callback in your `WorkflowStep` configuration will be run when this event is received. -Whether a builder is adding or editing a step, you need to send them a [Step from App settings modal](/legacy/legacy-steps-from-apps/legacy-steps-from-apps-configuration-view-object). This modal is where step-specific settings are chosen, and it has more restrictions than typical modals—most notably, it cannot include `title`, `submit`, or `close` properties. By default, the configuration modal's `callback_id` will be the same as the workflow step. +Whether a builder is adding or editing a step, you need to send them a Step from App settings modal. This modal is where step-specific settings are chosen, and it has more restrictions than typical modals—most notably, it cannot include `title`, `submit`, or `close` properties. By default, the configuration modal's `callback_id` will be the same as the workflow step. Within the `edit` callback, the `configure()` utility can be used to easily open your step's configuration modal by passing in an object with your view's `blocks`. To disable saving the configuration before certain conditions are met, pass in `submit_disabled` with a value of `true`. -To learn more about opening configuration modals, [read the documentation](/legacy/legacy-steps-from-apps/). - ```java import static com.slack.api.model.block.Blocks.*; import static com.slack.api.model.block.composition.BlockCompositions.plainText; @@ -119,8 +115,6 @@ Within the `save` callback, the `update()` method can be used to save the builde * `stepName` overrides the default step name * `stepImageUrl` overrides the default step image -To learn more about how to structure these parameters, [read the documentation](/legacy/legacy-steps-from-apps/). - ```java import java.util.*; import com.slack.api.model.workflow.*; @@ -156,7 +150,7 @@ app.step(step); --- ## Executing Steps from Apps -When your workflow step is executed by an end user, your app will receive a [`workflow_step_execute`](/reference/events/workflow_step_execute) event. The `execute` callback in your `WorkflowStep` configuration will be run when this event is received. +When your workflow step is executed by an end user, your app will receive a `workflow_step_execute` event. The `execute` callback in your `WorkflowStep` configuration will be run when this event is received. Using the `inputs` from the `save` callback, this is where you can make third-party API calls, save information to a database, update the user's Home tab, or decide the outputs that will be available to subsequent steps from apps by mapping values to the `outputs` object. diff --git a/docs/japanese/guides/steps-from-apps.md b/docs/japanese/guides/steps-from-apps.md index 07a56ce96..ab445ce3c 100644 --- a/docs/japanese/guides/steps-from-apps.md +++ b/docs/japanese/guides/steps-from-apps.md @@ -2,7 +2,7 @@ **ここで紹介されているワークフローステップの実装方法は非推奨となりました。 今後は[新しい方式(英語)](/workflows/workflow-steps)を利用してください。** -(アプリによる)ワークフローステップ(Workflow Steps from Apps) は、[ワークフロービルダー](/legacy/legacy-steps-from-apps/)におけるワークフローに組み込み可能なカスタムのワークフローステップを任意の Slack アプリが提供することを可能とします。 +(アプリによる)ワークフローステップ(Workflow Steps from Apps) は、ワークフロービルダーにおけるワークフローに組み込み可能なカスタムのワークフローステップを任意の Slack アプリが提供することを可能とします。 ワークフローステップは、三つの異なるユーザーイベントから構成されます: @@ -12,8 +12,6 @@ ワークフローステップを機能させるためには、これら三つのイベント全てを適切にハンドリングする必要があります。 -ワークフローステップのさらなる詳細については [API ドキュメント](/legacy/legacy-steps-from-apps/)を参考にしてください。 - ### Slack アプリの設定 ワークフローステップを有効にするには [Slack アプリ管理画面](http://api.slack.com/apps)にアクセスし、開発中のアプリを選択、左ペインの **Features** > **Workflow Steps** へ遷移します。このページで以下の設定を行います。 @@ -54,14 +52,12 @@ app.step(step); --- ## ステップの追加・編集 -ワークフローの作成者が、アプリが提供するステップをワークフローに追加(またはその設定を変更)するタイミングで、アプリは [`workflow_step_edit`](/legacy/legacy-steps-from-apps/legacy-steps-from-apps-workflow_step_edit-payload) というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `edit` コールバック関数が実行されます。 +ワークフローの作成者が、アプリが提供するステップをワークフローに追加(またはその設定を変更)するタイミングで、アプリは `workflow_step_edit` というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `edit` コールバック関数が実行されます。 -このとき、ワークフロー作成・変更のどちらの場合でも、アプリは[ワークフローステップ設定のためのモーダル](/legacy/legacy-steps-from-apps/legacy-steps-from-apps-configuration-view-object)を応答する必要があります。このモーダルは、ワークフローステップに固有の設定である必要があり、通常のモーダルにはない制約があります。最もわかりやすいものとしては、`title​`、`submit​`、`close` プロパティを設定することができません。また、デフォルトの設定では、この設定モーダルの `callback_id` はワークフローステップのものと同じものが使用されます。 +このとき、ワークフロー作成・変更のどちらの場合でも、アプリはワークフローステップ設定のためのモーダルを応答する必要があります。このモーダルは、ワークフローステップに固有の設定である必要があり、通常のモーダルにはない制約があります。最もわかりやすいものとしては、`title​`、`submit​`、`close` プロパティを設定することができません。また、デフォルトの設定では、この設定モーダルの `callback_id` はワークフローステップのものと同じものが使用されます。 `edit` コールバック関数の中では モーダルの view のうち `blocks` だけを渡すだけで簡単にステップ設定モーダルをオープンすることができる `configure()` というユーティリティ関数が利用できます。これは、必要な入力内容が揃うまで設定の保存を無効にする `submit_disabled` というオプションを `true` に設定します。 -設定モーダルを開く処理に関するさらなる詳細は、[ドキュメント](/legacy/legacy-steps-from-apps/legacy-steps-from-apps-configuration-view-object)を参考にしてください。 - ```java import static com.slack.api.model.block.Blocks.*; import static com.slack.api.model.block.composition.BlockCompositions.plainText; @@ -109,7 +105,7 @@ app.step(step); - `step_name` は、デフォルトのステップ名を上書きするために使用します - `step_image_url` は、デフォルトのステップのイメージ画像を上書きするために使用します -これら引数をどのように構成するかの詳細は、[ドキュメント](/legacy/legacy-steps-from-apps/legacy-steps-from-apps-workflow_step-object)を参考にしてください。 +これら引数をどのように構成するかの詳細は、ドキュメントを参考にしてください。 ```java import java.util.*; @@ -146,7 +142,7 @@ app.step(step); --- ## ステップの実行 -ワークフローの利用者によって、アプリが提供するカスタムのワークフローステップが実行されるとき、アプリは[`workflow_step_execute`](/reference/events/workflow_step_execute) というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `execute` コールバック関数が実行されます。 +ワークフローの利用者によって、アプリが提供するカスタムのワークフローステップが実行されるとき、アプリは`workflow_step_execute` というイベントを受信します。このイベントの受信時に `WorkflowStep` 設定オブジェクト内の `execute` コールバック関数が実行されます。 `save` コールバック関数で予め規定された `inputs` の情報を使って、ここでの処理は、サードパーティの API を呼び出したり、データベースに情報を保存したり、そのユーザーのホームタブを更新したり、`outputs` オブジェクトを構築することで後続のワークフローステップが利用できる情報を設定したりします。