Forums / General / Can new trigger points be created?

Can new trigger points be created?

Author Message

Deane Barker

Tuesday 30 December 2008 1:39:00 pm

Is it possible to create new trigger points? I'd like to hook workflow events into the create, edit, move, and remove functions.

We're trying to get some audit trail functionality. Our client wants a log of all the actions that have been taken on content in their install.

I thought about using the notification system, but it doesn't seem to log a notification event for a removal of content.

Heath

Tuesday 30 December 2008 2:13:57 pm

Yes, <i>http://ezpedia.org/wiki/en/ez/trigger
http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics/workflows#comment4540</i>

Simply review an existing module's use of the trigger / workflow system as a reference when creating your own.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Heath

Tuesday 30 December 2008 9:22:10 pm

Deane,

<i> > Is it possible to create new trigger points? I'd like to hook workflow events into the create, edit, move, and remove functions.</i>

Yes. You can add ini settings and php code into a patched kernel or extension module to provide for the execution of additional triggers. [1-6]

<i> >We're trying to get some audit trail functionality. Our client wants a log of all the actions that have been taken on content in their install.</i>

Neat idea! Seems fairly reasonable request.

<i> > I thought about using the notification system, but it doesn't seem to log a notification event for a removal of content. </i>

Perhaps a question of which would be simpler to add. The notification trigger is simple enough to create yet not as useful to others as a patch to add a default content removal notification to admin user group users subscribed to that node (perhaps with instructions on how to restore the node if needed / trash system was used in removal)

hth,
Heath

[1] http://pubsvn.ez.no/nextgen/trunk/kernel/shop/operation_definition.php
[2] http://pubsvn.ez.no/nextgen/trunk/kernel/shop/ezshopoperationcollection.php
[3] http://pubsvn.ez.no/nextgen/trunk/kernel/shop/add.php
[4] eZOperationHandler::execute()
[5] http://pubsvn.ez.no/nextgen/trunk/settings/workflow.ini
[6] [OperationSettings] AvailableOperationList[]

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Greg McAvoy-Jensen

Tuesday 30 December 2008 9:39:19 pm

Deane,

You're probably already aware of eZ Publish's built-in audit trail feature, but in case it's useful for anyone, here's the documentation:

http://ez.no/doc/ez_publish/technical_manual/4_0/features/audit_trailing
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/audit_ini/auditsettings/auditfilenames

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Heath

Sunday 04 January 2009 5:30:05 am

Hello Deane,

I noticed another related thread of interest,
<i>http://ez.no/developer/forum/suggestions/requesting_remove_triggers
http://ez.no/developer/contribs/hacks/content_remove_workflow
http://ez.no/content/download/122670/659188/file/content_remove_workflow.zip</i>

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org