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)
63 foreach($definitions as $definition)
65 if($definition[
'id'] = $parameter)
67 switch (strtolower($definition[
'role']))
70 $recipient = $definition[
'value'];
73 $subject = $definition[
'value'];
80 $mail_data = $this->context->getContext()->getMessageDefinition($this->message_name);
84 require_once
'./Services/WorkflowEngine/classes/activities/class.ilWorkflowEngineMailNotification.php';
86 $mail->setSubjectText($subject);
87 $mail->setBodyText($mail_text);
89 $mail->send($recipient);
168 return base64_decode($message_text);
174 preg_match_all(
'/\[(.*?)\]/',$message_text, $matches, PREG_PATTERN_ORDER);
176 foreach($matches[0] as $match)
178 $placeholder = substr($match, 1, strlen($match)-2);
181 if(strtolower(substr($placeholder, 0 , strlen(
'EVENTLINK'))) ==
'eventlink')
184 $content = $this->getEventLink($match);
189 $content = $this->context->getContext()->getInstanceVarById($placeholder);
194 $message_text = str_replace($match, $content, $message_text);
197 return $message_text;
200 public function getEventLink($eventlink_string)
202 $type = substr($eventlink_string, 1, strpos($eventlink_string,
' ')-1);
203 $params = substr($eventlink_string, strpos($eventlink_string,
' ')+1, -1);
206 preg_match_all(
'/\{{(.*?)\}}/',
$params, $matches, PREG_PATTERN_ORDER);
207 foreach($matches[1] as $match)
209 if($match ==
'THIS:WFID')
211 $params = str_replace(
'{{'.$match.
'}}',$this->getContext()->getContext()->getDbId(),
$params);
214 $pieces = explode(
':',
$params);
217 $ilias = $DIC[
'ilias'];
220 . $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)
Create styles array
The data for the language used.
ilActivity Interface is part of the petri net based workflow engine.
processPlaceholders($message_text)