Skip to content

Commit

Permalink
chore: purge the "workflow step" terminology (#1124)
Browse files Browse the repository at this point in the history
* chore: purge the workflow step terminology

* Improve with s

* Update docs/content/steps/steps.md

Co-authored-by: Fil Maj <maj.fil@gmail.com>

---------

Co-authored-by: Fil Maj <maj.fil@gmail.com>
  • Loading branch information
WilliamBergamin and filmaj authored Aug 12, 2024
1 parent b0be91a commit fbd6462
Show file tree
Hide file tree
Showing 28 changed files with 95 additions and 95 deletions.
10 changes: 5 additions & 5 deletions docs/content/steps/adding-editing-steps.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: Adding or editing workflow steps
title: Adding or editing steps from apps
lang: en
slug: /concepts/adding-editing-steps
---

:::danger

Workflow Steps from Apps are a deprecated feature.
Steps from apps are a deprecated feature.

Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom functions for Bolt.
Steps from apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom steps for Bolt.

Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information.

:::

When a builder adds (or later edits) your step in their workflow, your app will receive a [`workflow_step_edit` event](https://api.slack.com/reference/workflows/workflow_step_edit). 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 [workflow step configuration modal](https://api.slack.com/reference/workflows/configuration-view). 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 configuration modal](https://api.slack.com/reference/workflows/configuration-view). 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 step from app.

Within the `edit` callback, the `configure()` utility can be used to easily open your step's configuration modal by passing in the view's blocks with the corresponding `blocks` argument. To disable saving the configuration before certain conditions are met, you can also pass in `submit_disabled` with a value of `True`.

Expand Down Expand Up @@ -59,4 +59,4 @@ ws = WorkflowStep(
execute=execute,
)
app.step(ws)
```
```
16 changes: 8 additions & 8 deletions docs/content/steps/creating-steps.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
title: Creating workflow steps
title: Creating steps from apps
lang: en
slug: /concepts/creating-steps
---

:::danger

Workflow Steps from Apps are a deprecated feature.
Steps from apps are a deprecated feature.

Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom functions for Bolt.
Steps from apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom steps for Bolt.

Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information.

:::

To create a workflow step, Bolt provides the `WorkflowStep` class.
To create a step from app, Bolt provides the `WorkflowStep` class.

When instantiating a new `WorkflowStep`, pass in the step's `callback_id` and a configuration object.

The configuration object contains three keys: `edit`, `save`, and `execute`. Each of these keys must be a single callback or a list of callbacks. All callbacks have access to a `step` object that contains information about the workflow step event.
The configuration object contains three keys: `edit`, `save`, and `execute`. Each of these keys must be a single callback or a list of callbacks. All callbacks have access to a `step` object that contains information about the step from app event.

After instantiating a `WorkflowStep`, you can pass it into `app.step()`. Behind the scenes, your app will listen and respond to the workflow step’s events using the callbacks provided in the configuration object.
After instantiating a `WorkflowStep`, you can pass it into `app.step()`. Behind the scenes, your app will listen and respond to the step’s events using the callbacks provided in the configuration object.

Alternatively, workflow steps can also be created using the `WorkflowStepBuilder` class alongside a decorator pattern. For more information, including an example of this approach, [refer to the documentation](https://slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder).
Alternatively, steps from apps can also be created using the `WorkflowStepBuilder` class alongside a decorator pattern. For more information, including an example of this approach, [refer to the documentation](https://slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder).

Refer to the module documents (<a href="https://slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html">common</a> / <a href="https://slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/utilities/index.html">step-specific</a>) to learn the available arguments.

Expand Down Expand Up @@ -56,4 +56,4 @@ ws = WorkflowStep(

# Pass Step to set up listeners
app.step(ws)
```
```
12 changes: 6 additions & 6 deletions docs/content/steps/executing-steps.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: Executing workflow steps
title: Executing steps from apps
lang: en
slug: /concepts/executing-steps
---

:::danger

Workflow Steps from Apps are a deprecated feature.
Steps from apps are a deprecated feature.

Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom functions for Bolt.
Steps from apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom steps for Bolt.

Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information.

:::

When your workflow step is executed by an end user, your app will receive a [`workflow_step_execute` event](https://api.slack.com/events/workflow_step_execute). The `execute` callback in your `WorkflowStep` configuration will be run when this event is received.
When your step from app is executed by an end user, your app will receive a [`workflow_step_execute` event](https://api.slack.com/events/workflow_step_execute). 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 workflow steps by mapping values to the `outputs` object.
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.

Within the `execute` callback, your app must either call `complete()` to indicate that the step's execution was successful, or `fail()` to indicate that the step's execution failed.

Expand All @@ -42,4 +42,4 @@ ws = WorkflowStep(
execute=execute,
)
app.step(ws)
```
```
10 changes: 5 additions & 5 deletions docs/content/steps/saving-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ slug: /concepts/saving-steps

:::danger

Workflow Steps from Apps are a deprecated feature.
Steps from apps are a deprecated feature.

Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom functions for Bolt.
Steps from apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom steps for Bolt.

Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information.

Expand All @@ -18,8 +18,8 @@ After the configuration modal is opened, your app will listen for the `view_subm

Within the `save` callback, the `update()` method can be used to save the builder's step configuration by passing in the following arguments:

- `inputs` is a dictionary representing the data your app expects to receive from the user upon workflow step execution.
- `outputs` is a list of objects containing data that your app will provide upon the workflow step's completion. Outputs can then be used in subsequent steps of the workflow.
- `inputs` is a dictionary representing the data your app expects to receive from the user upon step execution.
- `outputs` is a list of objects containing data that your app will provide upon the step's completion. Outputs can then be used in subsequent steps of the workflow.
- `step_name` overrides the default Step name
- `step_image_url` overrides the default Step image

Expand Down Expand Up @@ -59,4 +59,4 @@ ws = WorkflowStep(
execute=execute,
)
app.step(ws)
```
```
16 changes: 8 additions & 8 deletions docs/content/steps/steps.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
title: Overview of Workflow Steps for apps
title: Overview of steps from apps
lang: en
slug: /concepts/steps
---

:::danger

Workflow Steps from Apps are a deprecated feature.
Steps from apps are a deprecated feature.

Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom functions for Bolt.
Steps from apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as custom steps for Bolt.

Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information.

:::

Steps from Apps for legacy workflows are now deprecated. Use new [custom steps](https://api.slack.com/automation/functions/custom-bolt).
Steps from apps for legacy workflows are now deprecated. Use new [custom steps](https://api.slack.com/automation/functions/custom-bolt).

Workflow Steps from apps allow your app to create and process custom workflow steps that users can add using [Workflow Builder](https://api.slack.com/workflows).
Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://api.slack.com/workflows).

A workflow step is made up of three distinct user events:
Steps from apps are made up of three distinct user events:

- Adding or editing the step in a Workflow
- Saving or updating the step's configuration
- The end user's execution of the step

All three events must be handled for a workflow step to function.
All three events must be handled for a step from app to function.

Read more about workflow steps from apps in the [API documentation](https://api.slack.com/workflows/steps).
Read more about steps from apps in the [API documentation](https://api.slack.com/workflows/steps).
4 changes: 2 additions & 2 deletions docs/i18n/ja-jp/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"message": "応用コンセプト",
"description": "The label for category Advanced concepts in sidebar sidebarBoltPy"
},
"sidebar.sidebarBoltPy.category.Workflow steps (Deprecated)": {
"sidebar.sidebarBoltPy.category.steps from apps (Deprecated)": {
"message": "ワークフローステップ 非推奨",
"description": "The label for category Workflow steps (Deprecated) in sidebar sidebarBoltPy"
"description": "The label for category steps from apps (Deprecated) in sidebar sidebarBoltPy"
},
"sidebar.sidebarBoltPy.category.Tutorials": {
"message": "チュートリアル",
Expand Down
10 changes: 5 additions & 5 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ const sidebars = {
'advanced/global-middleware',
'advanced/context',
'advanced/lazy-listeners',
],
],
},
{
type: 'category',
label: 'Workflow steps (Deprecated)',
label: 'Steps from apps (Deprecated)',
items: [
'steps/steps',
'steps/executing-steps',
Expand All @@ -75,21 +75,21 @@ const sidebars = {
'steps/saving-steps',
],
},
{type: 'html', value: '<hr>'},
{ type: 'html', value: '<hr>' },
{
type: 'category',
label: 'Tutorials',
items: [
'tutorial/getting-started-http'
],
},
{type: 'html', value: '<hr>'},
{ type: 'html', value: '<hr>' },
{
type: 'link',
label: 'Reference',
href: 'https://slack.dev/bolt-python/api-docs/slack_bolt/',
},
{type: 'html', value: '<hr>'},
{ type: 'html', value: '<hr>' },
{
type: 'link',
label: 'Release notes',
Expand Down
2 changes: 1 addition & 1 deletion examples/workflow_steps/async_steps_from_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)

################################################################################
# Steps from Apps for legacy workflows are now deprecated. #
# Steps from apps for legacy workflows are now deprecated. #
# Use new custom steps: https://api.slack.com/automation/functions/custom-bolt #
################################################################################

Expand Down
2 changes: 1 addition & 1 deletion examples/workflow_steps/async_steps_from_apps_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)

################################################################################
# Steps from Apps for legacy workflows are now deprecated. #
# Steps from apps for legacy workflows are now deprecated. #
# Use new custom steps: https://api.slack.com/automation/functions/custom-bolt #
################################################################################

Expand Down
2 changes: 1 addition & 1 deletion examples/workflow_steps/async_steps_from_apps_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from slack_bolt.async_app import AsyncApp, AsyncAck

################################################################################
# Steps from Apps for legacy workflows are now deprecated. #
# Steps from apps for legacy workflows are now deprecated. #
# Use new custom steps: https://api.slack.com/automation/functions/custom-bolt #
################################################################################

Expand Down
2 changes: 1 addition & 1 deletion examples/workflow_steps/steps_from_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from slack_bolt.workflows.step import Configure, Update, Complete, Fail

################################################################################
# Steps from Apps for legacy workflows are now deprecated. #
# Steps from apps for legacy workflows are now deprecated. #
# Use new custom steps: https://api.slack.com/automation/functions/custom-bolt #
################################################################################

Expand Down
2 changes: 1 addition & 1 deletion examples/workflow_steps/steps_from_apps_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from slack_bolt.workflows.step import Configure, Update, Complete, Fail, WorkflowStep

################################################################################
# Steps from Apps for legacy workflows are now deprecated. #
# Steps from apps for legacy workflows are now deprecated. #
# Use new custom steps: https://api.slack.com/automation/functions/custom-bolt #
################################################################################

Expand Down
2 changes: 1 addition & 1 deletion examples/workflow_steps/steps_from_apps_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from slack_bolt import App, Ack

################################################################################
# Steps from Apps for legacy workflows are now deprecated. #
# Steps from apps for legacy workflows are now deprecated. #
# Use new custom steps: https://api.slack.com/automation/functions/custom-bolt #
################################################################################

Expand Down
14 changes: 7 additions & 7 deletions slack_bolt/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def middleware_func(logger, body, next):
return None

# -------------------------
# Workflows: Steps from Apps
# Workflows: Steps from apps

def step(
self,
Expand All @@ -662,13 +662,13 @@ def step(
):
"""
Deprecated:
Steps from Apps for legacy workflows are now deprecated.
Steps from apps for legacy workflows are now deprecated.
Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
Registers a new Workflow Step listener.
Registers a new step from app listener.
Unlike others, this method doesn't behave as a decorator.
If you want to register a workflow step by a decorator, use `WorkflowStepBuilder`'s methods.
If you want to register a step from app by a decorator, use `WorkflowStepBuilder`'s methods.
# Create a new WorkflowStep instance
from slack_bolt.workflows.step import WorkflowStep
Expand All @@ -681,7 +681,7 @@ def step(
# Pass Step to set up listeners
app.step(ws)
Refer to https://api.slack.com/workflows/steps for details of Steps from Apps.
Refer to https://api.slack.com/workflows/steps for details of steps from apps.
To learn available arguments for middleware/listeners, see `slack_bolt.kwargs_injection.args`'s API document.
Expand All @@ -690,14 +690,14 @@ def step(
refer to `slack_bolt.workflows.step.utilities` API documents.
Args:
callback_id: The Callback ID for this workflow step
callback_id: The Callback ID for this step from app
edit: The function for displaying a modal in the Workflow Builder
save: The function for handling configuration in the Workflow Builder
execute: The function for handling the step execution
"""
warnings.warn(
(
"Steps from Apps for legacy workflows are now deprecated. "
"Steps from apps for legacy workflows are now deprecated. "
"Use new custom steps: https://api.slack.com/automation/functions/custom-bolt"
),
category=DeprecationWarning,
Expand Down
Loading

0 comments on commit fbd6462

Please sign in to comment.