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

Updating workflow API to no longer point to alpha API #1151

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Run the following command to start a workflow.
{{% codetab %}}

```bash
curl -i -X POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=12345678 \
curl -i -X POST http://localhost:3500/workflows/dapr/OrderProcessingWorkflow/start?instanceID=12345678 \
-H "Content-Type: application/json" \
-d '{"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}'
```
Expand All @@ -93,7 +93,7 @@ curl -i -X POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessing
{{% codetab %}}

```powershell
curl -i -X POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=12345678 `
curl -i -X POST http://localhost:3500/workflows/dapr/OrderProcessingWorkflow/start?instanceID=12345678 `
-H "Content-Type: application/json" `
-d '{"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}'
```
Expand All @@ -111,7 +111,7 @@ If successful, you should see a response like the following:
Send an HTTP request to get the status of the workflow that was started:

```bash
curl -i -X GET http://localhost:3500/v1.0-alpha1/workflows/dapr/12345678
curl -i -X GET http://localhost:3500/workflows/dapr/12345678
```

The workflow is designed to take several seconds to complete. If the workflow hasn't completed when you issue the HTTP request, you'll see the following JSON response (formatted for readability) with workflow status as `RUNNING`:
Expand Down
6 changes: 3 additions & 3 deletions examples/Workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ For the workflow API option, two identical `curl` commands are shown, one for Li
Make note of the "1234" in the commands below. This represents the unique identifier for the workflow run and can be replaced with any identifier of your choosing.

```bash
curl -i -X POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=1234 \
curl -i -X POST http://localhost:3500/workflows/dapr/OrderProcessingWorkflow/start?instanceID=1234 \
-H "Content-Type: application/json" \
-d '{"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}'
```

On Windows (PowerShell):

```powershell
curl -i -X POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=1234 `
curl -i -X POST http://localhost:3500/workflows/dapr/OrderProcessingWorkflow/start?instanceID=1234 `
-H "Content-Type: application/json" `
-d '{"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}'
```
Expand All @@ -71,7 +71,7 @@ If successful, you should see a response like the following:
Next, send an HTTP request to get the status of the workflow that was started:

```bash
curl -i -X GET http://localhost:3500/v1.0-alpha1/workflows/dapr/1234
curl -i -X GET http://localhost:3500/workflows/dapr/1234
```

The workflow is designed to take several seconds to complete. If the workflow hasn't completed yet when you issue the previous command, you should see the following JSON response (formatted for readability):
Expand Down
8 changes: 4 additions & 4 deletions examples/Workflow/WorkflowConsoleApp/demo.http
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
### Start order processing workflow - replace xxx with any id you like
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=xxx
POST http://localhost:3500/workflows/dapr/OrderProcessingWorkflow/start?instanceID=xxx
Content-Type: application/json

{"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}

### Start order processing workflow - replace xxx with any id you like
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=xxx
POST http://localhost:3500/workflows/dapr/OrderProcessingWorkflow/start?instanceID=xxx
Content-Type: application/json

{"Name": "Cars", "TotalCost": 10000, "Quantity": 30}

### Query dapr sidecar - replace xxx with id from the workflow you've created above
GET http://localhost:3500/v1.0-alpha1/workflows/dapr/xxx
GET http://localhost:3500/workflows/dapr/xxx

### Terminate the workflow - replace xxx with id from the workflow you've created above
POST http://localhost:3500/v1.0-alpha1/workflows/dapr/xxx/terminate
POST http://localhost:3500/workflows/dapr/xxx/terminate
Loading