Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feature/FOUR-16724
  • Loading branch information
luNunezProcessmaker committed Jun 24, 2024
commit 5b65757275211d28d3a0e665b459423fd6dca3e7
20 changes: 20 additions & 0 deletions ProcessMaker/Repositories/TokenRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public function persistActivityActivated(ActivityInterface $activity, TokenInter
}
}

$this->getAcionByEmail($activity);
Comment thread
luNunezProcessmaker marked this conversation as resolved.
Resolved

//Default 3 days of due date
$due = $this->getDueVariable($activity, $token);
$token->due_at = $due ? Carbon::now()->addHours($due) : null;
Expand All @@ -159,6 +161,24 @@ public function persistActivityActivated(ActivityInterface $activity, TokenInter
$this->instanceRepository->persistInstanceUpdated($token->getInstance());
}

/**
* Get action by email configuration
Comment thread
luNunezProcessmaker marked this conversation as resolved.
Resolved
*
* @param ActivityInterface $activity
*/
private function getAcionByEmail(ActivityInterface $activity)
Comment thread
pmPaulis marked this conversation as resolved.
Resolved
Comment thread
luNunezProcessmaker marked this conversation as resolved.
Resolved
{
$isActionsByEmail = $activity->getProperty('isActionsByEmail', false);
if ($isActionsByEmail) {
$configEmail = json_decode($activity->getProperty('configEmail', []));
Comment thread
luNunezProcessmaker marked this conversation as resolved.
Resolved
// Get the parameters to send the email
$emailserver = $configEmail->emailServer ?? 0;
$subject = $configEmail->subject ?? '';
$emailScreen = $configEmail->screenEmailRef ?? 0;
$emailScreenCompleted = $configEmail->screenCompleteRef ?? 0;
}
}

/**
* Get due Variable
*
Expand Down