Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markAsFinished() method for overridability and make markJobAsFinished() protected #47

Merged
merged 1 commit into from Apr 11, 2022
Merged

Add markAsFinished() method for overridability and make markJobAsFinished() protected #47

merged 1 commit into from Apr 11, 2022

Conversation

stevebauman
Copy link
Collaborator

This PR adds the ability for developers to override the markAsFinished() and markJobAsFinished() methods on their extended Workflow model to perform other logic after a workflow has been marked finished, or one of its jobs:

Ventrue::useWorkflowModel(Workflow::class);
class Worfklow extends VentureWorkflow
{
    protected function markAsFinished(): void
    {
        parent::markAsFinished();

        // Other logic...
    }

    protected function markJobAsFinished(object $job): void
    {
        parent::markJobAsFinished($job);

        // Other logic...
    }
}

Let me know your thoughts! Thanks for your time 🙏

No hard feelings on closure ❤️

@stevebauman stevebauman changed the title Add markAsFinished() method for overridability and make markJobAsFinished() protected Add markAsFinished() method for overridability and make markJobAsFinished() protected Apr 8, 2022
@ksassnowski
Copy link
Owner

Thanks!

@ksassnowski ksassnowski merged commit 6374e58 into ksassnowski:master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants