From b06744735b08b84390f998bbc04a5d011a9e2c57 Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Thu, 28 Aug 2025 17:55:16 +0200 Subject: [PATCH] Sync Java implementation with .NET and Python Signed-off-by: Marc Duiker --- .../springboot/examples/mgmt/SendNotificationActivity.java | 4 ++-- .../java/workflow-management/workflowmanagement.http | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tutorials/workflow/java/workflow-management/src/main/java/io/dapr/springboot/examples/mgmt/SendNotificationActivity.java b/tutorials/workflow/java/workflow-management/src/main/java/io/dapr/springboot/examples/mgmt/SendNotificationActivity.java index 96849145..b95c2688 100644 --- a/tutorials/workflow/java/workflow-management/src/main/java/io/dapr/springboot/examples/mgmt/SendNotificationActivity.java +++ b/tutorials/workflow/java/workflow-management/src/main/java/io/dapr/springboot/examples/mgmt/SendNotificationActivity.java @@ -31,10 +31,10 @@ public class SendNotificationActivity implements WorkflowActivity { @Override public Object run(WorkflowActivityContext ctx) { Logger logger = LoggerFactory.getLogger(SendNotificationActivity.class); - var message = ctx.getInput(String.class); + var counter = ctx.getInput(Integer.class); // Imagine a notification being sent to the user - logger.info("{} : Sending Notification: {}", ctx.getName(), message); + logger.info("{} : Sending Notification: {}", ctx.getName(), counter); return true; } } diff --git a/tutorials/workflow/java/workflow-management/workflowmanagement.http b/tutorials/workflow/java/workflow-management/workflowmanagement.http index 3fc8118a..2f072b0c 100644 --- a/tutorials/workflow/java/workflow-management/workflowmanagement.http +++ b/tutorials/workflow/java/workflow-management/workflowmanagement.http @@ -6,21 +6,17 @@ POST {{ apphost }}/start/{{counter}} ### Get the workflow status via the application -@instanceId={{startWorkflowRequest.response.body.instanceId}} +@instanceId={{startWorkflowRequest.response.body.*}} GET {{ apphost }}/status/{{ instanceId }} ### Suspend the workflow -@instanceId={{startWorkflowRequest.response.body.instanceId}} POST {{ apphost }}/suspend/{{ instanceId }} ### Resume the workflow -@instanceId={{startWorkflowRequest.response.body.instanceId}} POST {{ apphost }}/resume/{{ instanceId }} ### Terminate the workflow -@instanceId={{startWorkflowRequest.response.body.instanceId}} POST {{ apphost }}/terminate/{{ instanceId }} ### Purge the workflow -@instanceId={{startWorkflowRequest.response.body.instanceId}} DELETE {{ apphost }}/purge/{{ instanceId }}