ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilStopWorkflowActivity.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5require_once './Services/WorkflowEngine/interfaces/ilActivity.php';
7require_once './Services/WorkflowEngine/interfaces/ilWorkflowEngineElement.php';
9require_once './Services/WorkflowEngine/interfaces/ilNode.php';
10
25{
31 private $context;
32
34 protected $name;
35
41 public function __construct(ilNode $context)
42 {
43 $this->context = $context;
44 }
45
51 public function getContext()
52 {
53 return $this->context;
54 }
55
62 public function execute()
63 {
67 $workflow = $this->context->getContext();
68 $workflow->stopWorkflow();
69 }
70
74 public function __destruct()
75 {
76 unset($this->context);
77 }
78
82 public function setName($name)
83 {
84 $this->name = $name;
85 }
86
90 public function getName()
91 {
92 return $this->name;
93 }
94}
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
getContext()
Returns the parent object.
__construct(ilNode $context)
Default constructor.
ilActivity Interface is part of the petri net based workflow engine.
Definition: ilActivity.php:16
@noinspection PhpIncludeInspection
Definition: ilNode.php:26
ilWorkflowEngineElement Interface is part of the petri net based workflow engine.