Fix workflow

Signed-off-by: siri-varma <siri.varma@outlook.com>
This commit is contained in:
siri-varma 2025-05-28 07:48:19 -07:00
parent 0297ef719d
commit 382230e5e0
2 changed files with 4 additions and 6 deletions

View File

@ -17,7 +17,7 @@
<dependency> <dependency>
<groupId>io.dapr</groupId> <groupId>io.dapr</groupId>
<artifactId>dapr-sdk-workflows</artifactId> <artifactId>dapr-sdk-workflows</artifactId>
<version>0.12.0</version> <version>0.14.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>

View File

@ -55,10 +55,9 @@ public class WorkflowConsoleApp {
builder.registerActivity(UpdateInventoryActivity.class); builder.registerActivity(UpdateInventoryActivity.class);
// Build and then start the workflow runtime pulling and executing tasks // Build and then start the workflow runtime pulling and executing tasks
try (WorkflowRuntime runtime = builder.build()) { WorkflowRuntime runtime = builder.build();
System.out.println("Start workflow runtime"); System.out.println("Start workflow runtime");
runtime.start(false); runtime.start(false);
}
InventoryItem inventory = prepareInventoryAndOrder(); InventoryItem inventory = prepareInventoryAndOrder();
@ -66,7 +65,6 @@ public class WorkflowConsoleApp {
try (workflowClient) { try (workflowClient) {
executeWorkflow(workflowClient, inventory); executeWorkflow(workflowClient, inventory);
} }
} }
private static void executeWorkflow(DaprWorkflowClient workflowClient, InventoryItem inventory) { private static void executeWorkflow(DaprWorkflowClient workflowClient, InventoryItem inventory) {