Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MarcC 49 posts 356 karma points
    Jun 05, 2018 @ 13:09
    MarcC
    0

    Extending Plumber via Task Events, not firing?

    Hi Nathan,

    Great package idea and works great although I have hit a slight snag when subscribing to the events.

    As they are not static I need to initialise the events in the ApplicationStarted method, is this correct?

    When doing this and then adding a method, onto the TaskService it doesn't seem to trigger the event when I update a workflow task.

    Hoping you could guide me in the correct direction please?

            protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext context)
            {
                TasksService ts = new TasksService();
                ts.Updated += TaskService_Updated;
            }
    
            private void TaskService_Updated(object sender, TaskEventArgs e)
            {
                throw new NotImplementedException();
            }
    

    Thanks again for you time in developing this package

    M

  • Nathan Woulfe 447 posts 1665 karma points MVP 5x hq c-trib
    Jun 05, 2018 @ 20:10
    Nathan Woulfe
    0

    Hi Marc

    That absolutely should be working - Plumber events should be registered the same way as the native Umbraco ones.

    Have you tried events on other services or just Tasks?

    Will have a dig into it this morning.

    N

  • Nathan Woulfe 447 posts 1665 karma points MVP 5x hq c-trib
    Jun 06, 2018 @ 08:56
    Nathan Woulfe
    100

    Hi Marc

    This was my fault - a few versions back I refactored to add a proper service layer, and didn't update the events correctly. Basically, they weren't working because they weren't static.

    Once the new build finishes in a minute or two, events will work exactly like the Umbraco ones:

        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext context)
        {
            TasksService.Updated += TaskService_Updated;
        }
    
        private void TaskService_Updated(object sender, TaskEventArgs e)
        {
            throw new NotImplementedException();
        }
    
  • MarcC 49 posts 356 karma points
    Jun 06, 2018 @ 09:11
    MarcC
    0

    Superb Nathan,

    Thanks for the quick response and fix, is there anything I need to be aware of when updating the package?

    I intent to use the package quite extensively so would be happy to contribute and assist with anything in the future.

    Cheers,

    M

  • Nathan Woulfe 447 posts 1665 karma points MVP 5x hq c-trib
    Jun 06, 2018 @ 09:30
    Nathan Woulfe
    0

    If you're upgrading from v0.7.x to the v0.8.2 release, there's a restructure of the appplugins folder. Nothing breaking, but will leave some old files hanging around so might be better to delete appplugins/workflow before updating.

    Are you using NuGet or the zip? Shouldn't make any difference, but NuGet is easier to manage when I'm still pushing out fairly frequent updates.

    More than happy to accept contributions!

    N

  • MarcC 49 posts 356 karma points
    Jun 06, 2018 @ 09:32
    MarcC
    0

    Ill be using Nuget, im on 8 so I should be all good then.

    Do you have a list of work you are looking to do within the package somewhere?

    Cheers,

    M

  • Nathan Woulfe 447 posts 1665 karma points MVP 5x hq c-trib
    Jun 06, 2018 @ 09:45
    Nathan Woulfe
    0

    Roadmap is basically whatever comes to mind at the time - there're a few issues on the GitHub repo, but not much in the way of new features at the moment.

    Really focused on getting V1 tidy and shipped, been working towards that for a while and want to get it out of beta and released

  • MarcC 49 posts 356 karma points
    Jun 06, 2018 @ 10:07
    MarcC
    1

    Nice one. Ill keep an eye on the github issues and pick up any that I can.

    Great job again on the package mate

    M

Please Sign in or register to post replies

Write your reply to:

Draft