From aedf5b2de1c3d273292e6f61dce84bf49b6963f1 Mon Sep 17 00:00:00 2001 From: HunterX Date: Sat, 5 May 2018 22:09:53 +0800 Subject: [PATCH] Update README.md --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd550ae..a353ee4 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ -# camunda-rest-client \ No newline at end of file +# camunda-rest-client + +```php +# an example to use camunda rest api to complete task + +use Camunda\Entity\Request\TaskRequest; +use Camunda\Service\TaskService; + +$host = 'http://localhost:8080/engine-rest'; +$taskRequest = new TaskRequest(); +$taskService = new TaskService($host); + +$taskId = '8cd376cc-bf7f-11e7-a6e2-005056c00008'; +echo $taskService->complete($taskId, $taskRequest); +```