Skip to content

Commit 6b22430

Browse files
same as new
1 parent a669309 commit 6b22430

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/content/tutorial/custom-steps-workflow-builder-existing.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,16 @@ def handle_request_time_off(inputs: dict, fail: Fail, logger: logging.Logger, sa
186186

187187
#### Anatomy of a `.function()` listener {#function-listener-anatomy}
188188

189-
The function listener registration method (`.function()`) takes two arguments:
189+
The function decorator (`function()`) accepts an argument of type `str` and is the unique callback ID of the step. For our custom step, we’re using `request_time_off`. Every custom step you implement in an app needs to have a unique callback ID.
190190

191-
- The first argument is the unique callback ID of the step. For our custom step, we’re using `request_time_off`. Every custom step you implement in an app needs to have a unique callback ID.
192-
- The second argument is an asynchronous callback function, where we define the logic that will run when Slack tells the app that a user in the Slack client started a workflow that contains the `request_time_off` custom step.
191+
The callback function is where we define the logic that will run when Slack tells the app that a user in the Slack client started a workflow that contains the `request_time_off` custom step.
193192

194193
The callback function offers various utilities that can be used to take action when a function execution event is received. The ones we’ll be using here are:
195-
- `client` provides access to Slack API methods — like the `chat.postMessage` method, which we’ll use later to send a message to a channel
196-
- `inputs` provides access to the workflow variables passed into the step when the workflow was started
197-
- `fail` is a utility method for indicating that the step invoked for the current workflow step had an error
194+
195+
* `inputs` provides access to the workflow variables passed into the step when the workflow was started
196+
* `fail` indicates when the step invoked for the current workflow step has an error
197+
* `logger` provides a Python standard logger instance
198+
* `say` calls the `chat.Postmessage` API method
198199

199200
### Implementing the action listener {#action-listener}
200201

0 commit comments

Comments
 (0)