Forum Discussion

Maddy's avatar
Maddy
Ideator I
9 years ago

onBeforeUpdate Event method called twice, why?

I have a method from where I started workflow for document and I attach that method to Server Event of Document Itemtype, and called this method on "onAfterAdd" event, which works fine. Now, My requirement is when I revised the Document, again I want to start a workflow for revision B, for that, I used same method called "start_workflow_afterRev" which is used earlier but with some conditions, like document classification and state of the document from lifecycle, if both conditions matches then I want to start a workflow. and I attached "start_workflow_afterRev" this method to Document ItemType on "onBeforeUpdate" event, workflow get started, but this method called twice and because of this two task get created in My InBasket. why method runs twice on "onBeforeUpdate" event? or is there any solution to start workflow for new revision?     Regards, Maddy.  
No RepliesBe the first to reply