Skip to content

Commit 6db74e0

Browse files
fix: for the time being favor custom step over workflow step
1 parent 00ec24b commit 6db74e0

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bolt for Java Template App
1+
# Bolt for Java Custom Step Template
22

33
This is a Bolt for Java template app used to build custom steps for use in
44
[Workflow Builder](https://api.slack.com/start#workflow-builder).
@@ -112,7 +112,7 @@ For more information on creating workflows and adding custom steps, read more
112112

113113
### `/listeners`
114114

115-
Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so `/listeners/actions` handles incoming [Actions](https://docs.slack.dev/reference/interaction-payloads/block_actions-payload) requests and `/listeners/functions` handles [Workflow Steps](https://docs.slack.dev/workflows/workflow-steps).
115+
Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so `/listeners/actions` handles incoming [Actions](https://docs.slack.dev/reference/interaction-payloads/block_actions-payload) requests and `/listeners/functions` handles [Custom Steps](https://docs.slack.dev/workflows/workflow-steps).
116116

117117
### `/logback.xml`
118118

src/main/java/listeners/actions/ActionListeners.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
public class ActionListeners implements ListenerProvider {
88
@Override
99
public void register(App app) {
10-
app.blockAction(Constants.ActionIds.WORKFLOW_STEP_BUTTON, new CustomStepButtonActionListener(app));
10+
app.blockAction(Constants.ActionIds.CUSTOM_STEP_BUTTON, new CustomStepButtonActionListener(app));
1111
}
1212
}

src/main/java/listeners/functions/SampleStepListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public Response apply(EventsApiPayload<FunctionExecutedEvent> event, EventContex
3030
context.client().chatPostMessage(r -> r.channel(
3131
event.getEvent().getInputs().get("user_id").asString())
3232
.text(":wave: hey")
33-
.blocks(asBlocks(actions(a -> a.blockId(Constants.BlockIds.WORKFLOW_STEP_BUTTON)
34-
.elements(asElements(button(b -> b.actionId(Constants.ActionIds.WORKFLOW_STEP_BUTTON)
33+
.blocks(asBlocks(actions(a -> a.blockId(Constants.BlockIds.CUSTOM_STEP_BUTTON)
34+
.elements(asElements(button(b -> b.actionId(Constants.ActionIds.CUSTOM_STEP_BUTTON)
3535
.value("clicked")
3636
.text(plainText("click me!")))))))));
3737
} catch (Exception e) {

src/main/java/utils/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ private Constants() {}
66
public static class BlockIds {
77
private BlockIds() {}
88

9-
public static final String WORKFLOW_STEP_BUTTON = "workflow-step-button-block";
9+
public static final String CUSTOM_STEP_BUTTON = "custom-step-button-block";
1010
}
1111

1212
public static class ActionIds {
1313
private ActionIds() {}
1414

15-
public static final String WORKFLOW_STEP_BUTTON = "workflow-step-button-action";
15+
public static final String CUSTOM_STEP_BUTTON = "custom-step-button-action";
1616
}
1717
}

0 commit comments

Comments
 (0)