Skip to content

Add reference to WorkflowStepBuilder in docs - #389

Merged
misscoded merged 2 commits into
slackapi:mainfrom
misscoded:384-update-workflow-step-docs
Jul 2, 2021
Merged

misscoded merged 2 commits into
slackapi:mainfrom
misscoded:384-update-workflow-step-docs

Conversation

@misscoded

Copy link
Copy Markdown
Contributor

Fixes #384.

Introduces WorkflowStepBuilder in the Creating workflow steps section and links out to additional documentation for implementation details.

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@misscoded misscoded added the docs Improvements or additions to documentation label Jul 2, 2021
@misscoded
misscoded requested review from seratch and shaydewael July 2, 2021 20:03
@codecov

codecov Bot commented Jul 2, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #389 (95e055f) into main (b16d4cf) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #389   +/-   ##
=======================================
  Coverage   91.60%   91.60%           
=======================================
  Files         167      167           
  Lines        5384     5384           
=======================================
  Hits         4932     4932           
  Misses        452      452           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b16d4cf...95e055f. Read the comment docs.

@seratch seratch added this to the 1.7.0 milestone Jul 2, 2021

@seratch seratch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving this! Once you add the Japanese version too (I suggested the sentence in my comment), we can merge this PR.


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.

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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the following sentence to the Japanese version?

また、デコレーターとして利用できる `WorkflowStepBuilder` クラスを使ってワークフローステップを定義することもできます。 詳細は、[こちらのドキュメント](https://slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder)のコード例などを参考にしてください。


`WorkflowStep` のインスタンスを作成したら、それを`app.step()` メソッドに渡します。これによって、アプリがワークフローステップのイベントをリッスンし、設定オブジェクトで指定されたコールバックを使ってそれに応答できるようになります。

また、デコレーターとして利用できる `WorkflowStepBuilder` クラスを使ってワークフローステップを定義することもできます。 詳細は、[こちらのドキュメント](https://slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder)のコード例などを参考にしてください。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seratch Can you verify this transferred over OK and all looks good prior to merge?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@misscoded
misscoded merged commit c61206d into slackapi:main Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incomplete docs regarding workflow steps

2 participants