Skip to content

Commit

Permalink
Merge pull request #5729 from ProcessMaker/bugfix/FOUR-12661
Browse files Browse the repository at this point in the history
Bugfix/FOUR-12661: [34966 - 35021] Process Not Sending Email Notifications
  • Loading branch information
ryancooley committed Nov 30, 2023
2 parents 3588a0c + 2e455f1 commit 3744805
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions ProcessMaker/Nayra/Repositories/PersistenceTokenTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use ProcessMaker\Nayra\Bpmn\Events\ActivityActivatedEvent;
use ProcessMaker\Nayra\Bpmn\Events\ActivityClosedEvent;
use ProcessMaker\Nayra\Bpmn\Events\ActivityCompletedEvent;
use ProcessMaker\Nayra\Contracts\Bpmn\ActivityInterface;
use ProcessMaker\Repositories\TokenRepository;

trait PersistenceTokenTrait
Expand All @@ -30,9 +31,8 @@ public function persistActivityActivated(array $transaction)
$this->tokenRepository->persistActivityActivated($activity, $token);

// Event
$bpmnSubscriber = new BpmnSubscriber();
$event = new ActivityActivatedEvent($activity, $token);
$bpmnSubscriber->onActivityActivated($event);
app('events')->dispatch(ActivityInterface::EVENT_ACTIVITY_ACTIVATED, $event);
}

/**
Expand Down Expand Up @@ -63,13 +63,8 @@ public function persistActivityCompleted(array $transaction)
$this->tokenRepository->persistActivityCompleted($activity, $token);

// Event
$bpmnSubscriber = new BpmnSubscriber();
$event = new ActivityCompletedEvent($activity, $token);
$bpmnSubscriber->onActivityCompleted($event);

// Comments
$subscriber = new CommentsSubscriber();
$subscriber->onActivityCompleted($event);
app('events')->dispatch(ActivityInterface::EVENT_ACTIVITY_COMPLETED, $event);
}

/**
Expand Down

0 comments on commit 3744805

Please sign in to comment.