Forums / Developer / eZWorkflowType::STATUS_REJECTED
Fou Jino
Monday 14 March 2011 1:47:36 am
Hello,
I have a question about triggers. I have a trigger for before delete action. My trigger check a lot of condition before to delete an object.
But, I have a problem when the user select more of one object ... In this case, in my trigger I have a node liste, but if one of condition it's not respected, I have to return eZWorkflowType::STATUS_REJECTED, but if I return that, the others followed node it's not checked ?
Do you have an idea ? Thanks !
Foujino ~ http://www.foujino-blog.be
Nicolas Pastorino
Monday 14 March 2011 5:54:08 am
Hi Fou,
Are you talking about a workflow triggered before the content/delete operation ?
This would mean you have enabled the related trigger from workflow.ini (an override of it), as follows :
[OperationSettings] AvailableOperationList[]=content_delete
Also, could you be more explanatory about the conditions you are checking, or simply share the concerned part of the code ?
Cheers,
-- Nicolas Pastorino Director Community - eZ Member of the Community Project Board eZ Publish Community on twitter: http://twitter.com/ezcommunity t : http://twitter.com/jeanvoye G+ : http://plus.tl/jeanvoye
Tuesday 15 March 2011 2:38:47 am
Hi Nicolas,
Yes I speak about the trigger content_delete that I activated in workflow.ini.append.php, in my extension.
My trigger that call a workflow allow to check a lot of condition in the content of datatype, for exemple the date, the number, etc.
And after, as follows result, it rejects or accepts the deletion ...
But like I explained, if there are more than one object removed, my trigger received a list of object (node id), and for exemple if the first object fails the conditions, it returns eZWorkflowType::STATUS_REJECTED and the others object are not checked :s
Tuesday 15 March 2011 4:06:30 am
Could you share the code of your custom workflow event with us ? That will help us better understand the logic in it, and give us better chances to help you.
Andy Caiger
Friday 06 May 2011 3:32:45 am
I'd like to see an example of code for the content_delete triggers as well. Exponential finds my event, and allows me to set up a workflow, but it doesn't call the code when I delete an object.
EAB - Integrated Internet Success Offices in England, France & China. http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com