Skip to content

Commit d0409eb

Browse files
author
Sebastian Schöps
committed
Merge branch 'master' of github.com:wertmenschen/laravel-camunda
2 parents 87ba27b + 7681670 commit d0409eb

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616
],
1717
"require": {
18-
"illuminate/support": "~5.5",
1918
"guzzlehttp/guzzle": "^6.3",
2019
"php" : "~7.0"
2120
},

src/Models/DecisionDefinition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class DecisionDefinition extends CamundaModel
77
{
88
public function evaluate($variables)
99
{
10-
return $this->post('evaluate', ['json' => compact('variables')], true);
10+
return $this->post('evaluate', ['json' => compact('variables')]);
1111
}
1212

1313
public function getDefinition()

src/Models/ProcessDefinition.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ public static function byKey($key)
1111
return $processDefinition;
1212
}
1313

14-
public function startInstance()
14+
public function startInstance($data = [])
1515
{
16-
$processDefinition = $this->post('start');
16+
// At least one value must be set...
17+
if(count($data) == 0) {
18+
$data['a'] = 'b';
19+
}
20+
21+
$processDefinition = $this->post('start', $data, true);
1722
return new ProcessInstance($processDefinition->id);
1823
}
1924

src/Models/ProcessInstance.php

+10
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,14 @@ public function ended()
6666
{
6767
return $this->get('history/process-instance/?processInstanceId=' . $this->id)[0]->state == 'COMPLETED';
6868
}
69+
70+
public function getEndEventId()
71+
{
72+
return optional(Arr::first($this->get('history/activity-instance/?processInstanceId=' . $this->id . '&activityType=noneEndEvent')))->activityId;
73+
}
74+
75+
public function modify($data)
76+
{
77+
return $this->post('modification', $data,true);
78+
}
6979
}

0 commit comments

Comments
 (0)