Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How can i detect what is the node on request publish?
I try to detect the node id on PublishWorkflowProcess.Created event but i can't access to WorkflowInstancePoco object.
Can someone help me?
Which Plumber + Umbraco versions? Most recent version for Umbraco 8 has the nodeId as a field on the WorkflowTaskPoco. I can make the same change on the v7 version too.
I use Plumber 1.3.7 on Umbraco 8.6.1
My goal is to change a property of a node when i intercept the publish request event.
Following the code of my custom component used for handle Pulumber Events:
public class PumberComponent : IComponent
private readonly ILogger _logger;
public PumberComponent(ILogger loggert)
_logger = logger;
public void Initialize()
PublishWorkflowProcess.Created += PublishWorkflowProcess_Created;
PublishWorkflowProcess.Completed += PublishWorkflowProcess_Completed;
private void PublishWorkflowProcess_Completed(object sender, Plumber.Core.Events.Args.InstanceEventArgs e)
//The instance of WorkflowInstancePoco present in InstanceEventArgs is private so i can't access here
private void PublishWorkflowProcess_Created(object sender, Plumber.Core.Events.Args.InstanceEventArgs e)
public void Terminate()
The instance of WorkflowInstancePoco present in InstanceEventArgs is private so i can't access inside my event handler.
Maybe i do it on the wrong way...
Thanks in advance
Ah that's a bit useless isn't it... Private event args...
I'll fix that 🙂
Thanks a lot
My bad! All the others were correct, but not those raised in the WorkflowProcess events... Build is running now, will be on NuGet in 15 or so minutes. Plumber.Workflow.1.3.8-beta-000408 is the one you need, if you could update and let me know if the issue is resolved.
Nightly will also have some other unfinished bits in it because I was too quick on the commit-button click, and didn't exclude other work.
Changes add a caching layer for settings, which probably won't be noticeable but will lessen the load on the db. Not fully tested, so let me know if anything is dead/broken/missing.
On visual studio, itellisense, i can access to Instance, but at runtime i get this error:
Attempt by method 'qwerty.unipd.ucw.code.component.PumberComponent.PublishWorkflowProcess_Created(System.Object, Plumber.Core.Events.Args.InstanceEventArgs)' to access method 'Plumber.Core.Events.Args.InstanceEventArgs.get_Instance()' failed.
I can't reproduce that issue... Running 408 build on Umbraco 8.6.3 in release or debug mode, works fine (I'm testing by logging the node id on create/cancel)
Have you tried any of the other events? Try GroupService.Updated, then make changes to an approval group.
On my project i've 2 solution, one with all che code, controllers, composers, ecc... and another with Umbraco website.
Yesterday i've update plumber version only to my code solution....
Today, for correcting my mistake i've update plumber version to 408 build, also on my web solution.
This update caused another strange behavour, now on umbraco interface, any time i open a node i revice this exception:
Received an error from the server
An error occured
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Plumber.Web.Components.ContentEventsComponent.EditorModelEventManager_SendingContentModel(HttpActionExecutedContext sender, EditorModelEventArgs`1 e)
at Umbraco.Web.Editors.EditorModelEventManager.EmitEvent(HttpActionExecutedContext sender, EditorModelEventArgs e) in D:\a\1\s\src\Umbraco.Web\Editors\EditorModelEventManager.cs:line 64
at Umbraco.Web.WebApi.Filters.OutgoingEditorModelEventAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext) in D:\a\1\s\src\Umbraco.Web\WebApi\Filters\OutgoingEditorModelEventAttribute.cs:line 32
at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
Do you have any idea?
Yup, I do - it's fixed in 409, which just published. Was checking for excluded nodes, which can only exist on a licensed install.
It works great!
Thanks for your support, HFYR
I've just realize that i need a license for plumber, so i bought it.
Please can you give me your email? I need to ask you an invioce, thanks
I'll get that to you shortly - Stripe should send it automatically, not sure why that's not happening. Thanks for your support!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted