Commit 2826bd8 1 parent 975ae92 commit 2826bd8 Copy full SHA for 2826bd8
File tree 1 file changed +11
-10
lines changed
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Wertmenschen \CamundaApi \Models ;
4
4
5
-
6
5
class ProcessDefinition extends CamundaModel
7
6
{
8
- protected $ key ;
9
-
10
- public function startInstance ()
11
- {
12
- $ tenant = strlen (config ('camunda.api.tenant-id ' )) ? '/tenant-id/ ' . config ('camunda.api.tenant-id ' ) : '' ;
13
- $ processDefinition = $ this ->post ('process-definition/key/ ' . $ this ->key . $ tenant . '/start ' );
14
- return new ProcessInstance ($ processDefinition ->id );
15
- }
16
-
17
7
public static function byKey ($ key )
18
8
{
19
9
$ processDefinition = new self ;
20
10
$ processDefinition ->key = $ key ;
21
11
return $ processDefinition ;
22
12
}
13
+
14
+ public function startInstance ()
15
+ {
16
+ $ processDefinition = $ this ->post ('start ' );
17
+ return new ProcessInstance ($ processDefinition ->id );
18
+ }
19
+
20
+ public function xml ()
21
+ {
22
+ return $ this ->get ('xml ' )->bpmn20Xml ;
23
+ }
23
24
}
You can’t perform that action at this time.
0 commit comments