Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Docs: Custom steps documentation #1457

Merged
merged 3 commits into from
Mar 28, 2025
Merged

Conversation

haleychaas
Copy link
Contributor

@haleychaas haleychaas commented Mar 27, 2025

Added a documentation page about custom steps.

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

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

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

Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.03%. Comparing base (bd9c5e8) to head (d1966d3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1457   +/-   ##
=========================================
  Coverage     73.03%   73.03%           
- Complexity     4378     4379    +1     
=========================================
  Files           475      475           
  Lines         14243    14243           
  Branches       1447     1447           
=========================================
+ Hits          10402    10403    +1     
+ Misses         2987     2986    -1     
  Partials        854      854           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Great work 💯 thanks for working on this

Left a few small comments, once resolved we can merge

}
```

Once your custom step is defined in your app's manifest and implemented in code, it is discoverable in Workflow Builder when you **Add Step** and search for the name of your app.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Once your custom step is defined in your app's manifest and implemented in code, it is discoverable in Workflow Builder when you **Add Step** and search for the name of your app.
Once your custom step is defined in your app's manifest and implemented in code, it is discoverable in Workflow Builder when you **Add Step** and search for the title of your step or name of your app.

app.function("sample_function", (req, ctx) -> {
app.executorService().submit(() -> {
try {
var userId = req.getEvent().getInputs().get("user_id").asString();
Copy link
Contributor

Choose a reason for hiding this comment

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

Every other code snippet in these docs use the proper type rather then var

Suggested change
var userId = req.getEvent().getInputs().get("user_id").asString();
String userId = req.getEvent().getInputs().get("user_id").asString();

app.executorService().submit(() -> {
try {
var userId = req.getEvent().getInputs().get("user_id").asString();
var response = ctx.client().chatPostMessage(r -> r
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
var response = ctx.client().chatPostMessage(r -> r
ChatPostMessageResponse response = ctx.client().chatPostMessage(r -> r

.channel(userId) // sending a DM
.text("Hi! Thank you for submitting the request! We'll let you know once the processing completes.")
);
var outputs = new HashMap<String, Object>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
var outputs = new HashMap<String, Object>();
Map<String, Object> outputs = new HashMap<String, Object>();

@haleychaas haleychaas merged commit d435b84 into main Mar 28, 2025
8 checks passed
@WilliamBergamin WilliamBergamin deleted the custom-steps-documentation branch March 28, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants