mirror of https://github.com/dapr/quickstarts.git
Merge pull request #1238 from marcduiker/fix-java-workflow
Tutorials/Workflow: Sync Java implementation with .NET and Python
This commit is contained in:
commit
16dac6e1db
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue