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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:17:33
Script start
Timing: Jan 18 2025 18:17:33
Module start 'layout'
Timing: Jan 18 2025 18:17:33
Module start 'content'
Timing: Jan 18 2025 18:17:35
Module end 'content'
Timing: Jan 18 2025 18:17:35
Script end

Main resources:

Total runtime1.7630 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0098 589.0469152.6250
Module start 'layout' 0.00980.0044 741.671939.4453
Module start 'content' 0.01421.7472 781.1172622.6250
Module end 'content' 1.76130.0016 1,403.742216.1563
Script end 1.7630  1,419.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2043160.0002
Check MTime0.00150.0853160.0001
Mysql Total
Database connection0.00100.058610.0010
Mysqli_queries1.641193.0878650.0252
Looping result0.00100.0591630.0000
Template Total1.668894.720.8344
Template load0.00200.114920.0010
Template processing1.666794.538120.8334
Template load and register function0.00010.006110.0001
states
state_id_array0.00090.050310.0009
state_identifier_array0.00340.190720.0017
Override
Cache load0.00170.0950460.0000
Sytem overhead
Fetch class attribute can translate value0.00100.054530.0003
Fetch class attribute name0.00110.064180.0001
XML
Image XML parsing0.00160.091330.0005
class_abstraction
Instantiating content class attribute0.00000.0013100.0000
General
dbfile0.00610.3463310.0002
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs