mirror of https://github.com/dapr/quickstarts.git
updating references and readme
Signed-off-by: salaboy <Salaboy@gmail.com>
This commit is contained in:
parent
dc047afdaa
commit
5fcb630952
|
|
@ -4,7 +4,7 @@ This tutorial demonstrates how to chain multiple tasks together as a sequence in
|
|||
|
||||
## Inspect the code
|
||||
|
||||
Open the `ChainingWorkflow.java` file in the `tutorials/workflow/java/task-chaining/src/main/java/io/dapr/springboot/examples/wfp/chain` folder. This file contains the definition for the workflow.
|
||||
Open the [`ChainingWorkflow.java`](src/main/java/io/dapr/springboot/examples/chain/ChainingWorkflow.java) file in the `tutorials/workflow/java/task-chaining/src/main/java/io/dapr/springboot/examples/wfp/chain` folder. This file contains the definition for the workflow.
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
@apphost=http://localhost:5255
|
||||
@apphost=http://localhost:8080
|
||||
|
||||
### Start the TaskChaining workflow
|
||||
# @name startWorkflowRequest
|
||||
POST {{ apphost }}/start
|
||||
|
||||
|
||||
@instanceId={{startWorkflowRequest.response.headers.Location}}
|
||||
@daprHost=http://localhost:3555
|
||||
### Get the workflow status
|
||||
GET {{ daprHost }}/v1.0/workflows/dapr/{{ instanceId }}
|
||||
GET {{ apphost }}/output
|
||||
|
|
@ -14,6 +14,9 @@
|
|||
<name>task-chaining</name>
|
||||
<description>Task Chaining Workflow Example</description>
|
||||
|
||||
<properties>
|
||||
<dapr.spring.version>0.15.0-rc-7</dapr.spring.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
@ -30,12 +33,12 @@
|
|||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-starter</artifactId>
|
||||
<version>0.15.0-rc-5</version>
|
||||
<version>${dapr.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-starter-test</artifactId>
|
||||
<version>0.15.0-rc-5</version>
|
||||
<version>${dapr.spring.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ package io.dapr.springboot.examples;
|
|||
|
||||
|
||||
import io.dapr.spring.workflows.config.EnableDaprWorkflows;
|
||||
import io.dapr.springboot.examples.chain.ChainWorkflow;
|
||||
import io.dapr.springboot.examples.chain.ChainingWorkflow;
|
||||
import io.dapr.workflows.client.DaprWorkflowClient;
|
||||
import io.dapr.workflows.client.WorkflowInstanceStatus;
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
@RestController
|
||||
|
|
@ -46,7 +45,7 @@ public class TaskChainingRestController {
|
|||
*/
|
||||
@PostMapping("start")
|
||||
public String chain() throws TimeoutException {
|
||||
instanceId = daprWorkflowClient.scheduleNewWorkflow(ChainWorkflow.class, "This");
|
||||
instanceId = daprWorkflowClient.scheduleNewWorkflow(ChainingWorkflow.class, "This");
|
||||
return instanceId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import io.dapr.workflows.WorkflowStub;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ChainWorkflow implements Workflow {
|
||||
public class ChainingWorkflow implements Workflow {
|
||||
@Override
|
||||
public WorkflowStub create() {
|
||||
return ctx -> {
|
||||
Loading…
Reference in New Issue