5require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7require_once
'./Services/WorkflowEngine/interfaces/ilExternalDetector.php';
142 return array(
'type' => $this->event_type,
'content' => $this->event_content);
164 return array(
'type' => $this->event_subject_type,
'identifier' => $this->event_subject_identifier);
186 return array(
'type' => $this->event_context_type,
'identifier' => $this->event_context_identifier);
216 if ($this->event_type !==
$params[0])
222 if ($this->event_content !==
$params[1])
228 if ($this->event_subject_type !==
$params[2])
234 if ($this->event_subject_identifier !==
$params[3] && $this->event_subject_identifier != 0)
240 if ($this->event_context_type !==
$params[4])
246 if ($this->event_context_identifier !==
$params[5] && $this->event_context_identifier != 0)
256 foreach(
$params as $key => $value)
258 $this->
getContext()->setRuntimeVar($key, $value);
261 $this->was_activated =
true;
277 if ($this->listening_start == 0 && $this->listening_end == 0)
283 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
284 if ($this->listening_start <= ilWorkflowUtils::time())
287 if ($this->listening_end >= ilWorkflowUtils::time()
288 || $this->listening_end == 0)
311 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowInvalidArgumentException.php';
343 $this->db_id = $a_id;
354 if ($this->db_id !=
null)
360 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
371 if ($this->db_id ==
null)
385 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
386 ilWorkflowDbHelper::writeDetector($this);
395 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
396 ilWorkflowDbHelper::deleteDetector($this);
406 return array (
'listening_start' => $this->listening_start,
'listening_end' => $this->listening_end);
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
getEventSubject()
Get the event subject set to the detector.
onActivate()
Method called on activation.
getDbId()
Returns the database id of the detector if set.
onDeactivate()
Method called on deactivation.
setEventSubject($event_subject_type, $event_subject_identifier)
Set the event subject type to the detector.
setEvent($event_type, $event_content)
Sets the event type and content (/qualifier) for the detector.
__construct($context)
Default constructor, passing the context to the parent constructor.
hasDbId()
Returns, if the detector has a database id.
trigger($params)
Triggers the detector.
setListeningTimeframe($listening_start, $listening_end)
Sets the timeframe, in which the detector is listening.
$event_context_identifier
setEventContext($event_context_type, $event_context_identifier)
Set the event context to the detector.
writeDetectorToDb()
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the d...
deleteDetectorFromDb()
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database...
setDbId($a_id)
Sets the database id of the detector.
getEventContext()
Get the event context set to the detector.
getListeningTimeframe()
Returns the listening timefrage of the detector.
getEvent()
Returns the event type and content currently set to the detector.
isListening()
Returns if the detector is currently listening.
$event_subject_identifier
@noinspection PhpIncludeInspection
getDetectorState()
Returns if the current detector state is satisfied or not.
getContext()
Returns the parent object.
setDetectorState($new_state)
Sets a new detector state.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection