5 require_once
'./Services/WorkflowEngine/interfaces/ilActivity.php';
7 require_once
'./Services/WorkflowEngine/interfaces/ilNode.php';
43 $this->context = $a_context;
57 $definitions = $workflow->getInstanceVars();
61 foreach ($this->parameters as $parameter) {
62 foreach ($definitions as $definition) {
63 if ($definition[
'id'] = $parameter) {
64 switch (strtolower($definition[
'role'])) {
66 $recipient = $definition[
'value'];
69 $subject = $definition[
'value'];
76 $mail_data = $this->context->getContext()->getMessageDefinition($this->message_name);
80 require_once
'./Services/WorkflowEngine/classes/activities/class.ilWorkflowEngineMailNotification.php';
82 $mail->setSubjectText($subject);
83 $mail->setBodyText($mail_text);
85 $mail->send($recipient);
164 return base64_decode($message_text);
170 preg_match_all(
'/\[(.*?)\]/', $message_text, $matches, PREG_PATTERN_ORDER);
172 foreach ($matches[0] as $match) {
173 $placeholder = substr($match, 1, strlen($match) - 2);
176 if (strtolower(substr($placeholder, 0, strlen(
'EVENTLINK'))) ==
'eventlink') {
178 $content = $this->getEventLink($match);
182 $content = $this->context->getContext()->getInstanceVarById($placeholder);
185 if (strlen($content)) {
186 $message_text = str_replace($match, $content, $message_text);
189 return $message_text;
192 public function getEventLink($eventlink_string)
194 $type = substr($eventlink_string, 1, strpos($eventlink_string,
' ') - 1);
195 $params = substr($eventlink_string, strpos($eventlink_string,
' ') + 1, -1);
198 preg_match_all(
'/\{{(.*?)\}}/',
$params, $matches, PREG_PATTERN_ORDER);
199 foreach ($matches[1] as $match) {
200 if ($match ==
'THIS:WFID') {
204 $pieces = explode(
':',
$params);
207 $ilias = $DIC[
'ilias'];
210 . $pieces[0] .
'EVT' . $pieces[1] .
'&client_id=' . $ilias->getClientId();
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
setParameters($parameters)
setMessageName($message_name)
getContext()
Returns a reference to the parent node.
__construct(ilNode $a_context)
Default constructor.
decodeMessageText($message_text)
ilActivity Interface is part of the petri net based workflow engine.
processPlaceholders($message_text)