From 4f451665369a9265b403c1f5e66471f4a900abd1 Mon Sep 17 00:00:00 2001 From: wertmenschen Date: Sat, 4 May 2019 20:32:13 +0200 Subject: [PATCH 1/6] Get EndEvent ID --- src/Models/ProcessInstance.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Models/ProcessInstance.php b/src/Models/ProcessInstance.php index 1f08041..5cc6d68 100644 --- a/src/Models/ProcessInstance.php +++ b/src/Models/ProcessInstance.php @@ -66,4 +66,9 @@ public function ended() { return $this->get('history/process-instance/?processInstanceId=' . $this->id)[0]->state == 'COMPLETED'; } + + public function getEndEventId() + { + return optional(Arr::first($this->get('history/activity-instance/?processInstanceId=' . $this->id . '&activityType=noneEndEvent')))->activityId; + } } From 600df67af27d309c8e7197a050f8c46d3331bb52 Mon Sep 17 00:00:00 2001 From: wertmenschen Date: Tue, 18 Jun 2019 11:11:15 +0200 Subject: [PATCH 2/6] Update ProcessDefinition.php --- src/Models/ProcessDefinition.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/ProcessDefinition.php b/src/Models/ProcessDefinition.php index 181faa5..02ba6a2 100644 --- a/src/Models/ProcessDefinition.php +++ b/src/Models/ProcessDefinition.php @@ -11,9 +11,9 @@ public static function byKey($key) return $processDefinition; } - public function startInstance() + public function startInstance($data = []) { - $processDefinition = $this->post('start'); + $processDefinition = $this->post('start', $data, true); return new ProcessInstance($processDefinition->id); } From ffef2293a6f2ec6ea61477ea4f1de6e448609c66 Mon Sep 17 00:00:00 2001 From: wertmenschen Date: Thu, 4 Jul 2019 21:16:24 +0200 Subject: [PATCH 3/6] Update ProcessDefinition.php --- src/Models/ProcessDefinition.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Models/ProcessDefinition.php b/src/Models/ProcessDefinition.php index 02ba6a2..f29f27f 100644 --- a/src/Models/ProcessDefinition.php +++ b/src/Models/ProcessDefinition.php @@ -13,6 +13,11 @@ public static function byKey($key) public function startInstance($data = []) { + // At least one value must be set... + if(count($data) == 0) { + $data['a'] = 'b'; + } + $processDefinition = $this->post('start', $data, true); return new ProcessInstance($processDefinition->id); } From 506458adbc4957fef15fe637c51491ecaf0e7332 Mon Sep 17 00:00:00 2001 From: wertmenschen Date: Thu, 18 Jul 2019 10:17:42 +0200 Subject: [PATCH 4/6] Update DecisionDefinition.php --- src/Models/DecisionDefinition.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/DecisionDefinition.php b/src/Models/DecisionDefinition.php index af6e66e..cd35179 100644 --- a/src/Models/DecisionDefinition.php +++ b/src/Models/DecisionDefinition.php @@ -7,7 +7,7 @@ class DecisionDefinition extends CamundaModel { public function evaluate($variables) { - return $this->post('evaluate', ['json' => compact('variables')], true); + return $this->post('evaluate', ['json' => compact('variables')]); } public function getDefinition() From 226936fc430d4f08355ea9cea935a439f4d78aa4 Mon Sep 17 00:00:00 2001 From: wertmenschen Date: Mon, 2 Sep 2019 23:42:27 +0200 Subject: [PATCH 5/6] Add process instance modification --- src/Models/ProcessInstance.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Models/ProcessInstance.php b/src/Models/ProcessInstance.php index 5cc6d68..1c16bb4 100644 --- a/src/Models/ProcessInstance.php +++ b/src/Models/ProcessInstance.php @@ -71,4 +71,9 @@ public function getEndEventId() { return optional(Arr::first($this->get('history/activity-instance/?processInstanceId=' . $this->id . '&activityType=noneEndEvent')))->activityId; } + + public function modify($data) + { + return $this->post('modification', $data,true); + } } From 7681670a00c8838fd94e994458c5f2acb3eb0894 Mon Sep 17 00:00:00 2001 From: wertmenschen Date: Thu, 12 Sep 2019 15:30:05 +0200 Subject: [PATCH 6/6] Remove dependency --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index a1d826f..d98454f 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ } ], "require": { - "illuminate/support": "~5.5", "guzzlehttp/guzzle": "^6.3", "php" : "~7.0" },