Forums / Developer / Workflow not running for "shop | confirmorder | after" trigger

Workflow not running for "shop | confirmorder | after" trigger

Author Message

Eirik Alfstad Johansen

Wednesday 14 January 2004 6:42:09 am

Hi,

I'm having a problem running a workflow associated with the "shop | confirmorder | after" trigger. The workflow (based on a custom written event) simply doesn't run (I do a check by having the event send me an email).

When I set the same workflow for the "shop | confirmorder | before" trigger, however, it runs like a charm.

Any idea what could be the reason?

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Björn Dieding@xrow.de

Wednesday 14 January 2004 4:34:02 pm

hard to say... the error is probably inside your code...

Are you using a stable eZ version?

You could try to hook up my shop sender extension available on subsvn.

At least this one works right. I used it in the same place.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Willie Seabrook

Wednesday 14 January 2004 8:54:42 pm

Are you trying to display a template? If so,that will probably not work unless you get modified edit.php and other files. This will be the case only if the shop triggers are executed in the same manner as the content triggers. In fact I don't think they are.

Secondly, if you are just trying to run simple event without returning a template, it probably won't work anyway as the ez guys are still working on developing the full features of the workflow system (as far as I know). I think they regard it as alpha. You might just have to cope with using the before trigger and making a little hack (i've done it heaps with the workflow system)

Regards,
Willie

Eirik Alfstad Johansen

Tuesday 03 February 2004 1:19:08 am

Hi guys,

Thanks for both your suggestions!

> hard to say... the error is probably inside your code...

I don't think it is, because the workflow runs exactly as it should when I use the "shop | confirmorder | before" trigger.

> Are you using a stable eZ version?

Yes.

> Are you trying to display a template?

No, I'm not.

> You might just have to cope with using the before trigger
> and making a little hack (i've done it heaps with the
> workflow system)

Would you care to elaborate on how you did this?

Thanks in advance !

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Monday 28 June 2004 7:32:45 am

Hi guys,

I just created a new workflow event for a different installation (3.4.0), and the exact same problem occurs here: I'm unable to run the workflow using "shop|confirmorder|after" as the trigger. When I, on the other hand, use "shop|confirmorder|before" as the trigger, everything works smoothly.

I can't belive I'm the only one experiencing this problem, and on two different installations using two different workflow events.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Monday 28 June 2004 3:57:13 pm

What you are viewing in the trigger screen is a bug:

http://ez.no/community/bug_reports/workflow_trigger_list_doesnt_respect_available_operations

According to 'kernel/shop/operation_definition.php' only the 'before' trigger is defined but eZ3 shows both :(

You can see where the workflow fires in particular module views by looking out for code like:

$operationResult = eZOperationHandler::execute( 'shop', 'confirmorder', array( 'order_id' => $order->attribute( 'id' ) ) );

If you look in 'kernel/shop/confirmorder.php' you will see that this line is only used in a 'before' capacity. The 'after' bit hasn't been written...

paul

--
http://www.visionwt.com

Eirik Alfstad Johansen

Tuesday 29 June 2004 1:30:04 am

Hi Paul.

Thanks for enlightening me!

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Tuesday 29 June 2004 3:26:05 am

You could add a new trigger to the operation_definition file, and add another execute line to the correct part of confirmorder.php that responds to the trigger.

I would probably put it just before this line:

$module->redirectTo( '/shop/checkout/' );

which is line 70 i believe.

That should get it working :)

paul

--
http://www.visionwt.com

Eirik Alfstad Johansen

Tuesday 29 June 2004 3:39:52 am

Hi Paul,

Thanks for the tip! I'll keep that in mind for future projects (hopefully it's be fixed by then). However, as for now, the event seems to work as supposed to, even though it runs before.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Tuesday 29 June 2004 3:51:16 am

You could add a before trigger to the checkout view. This is almost the same as the confirmorder after trigger since when you confirm the order you get directed to the checkout...

paul

--
http://www.visionwt.com

eZ debug

Timing: Jan 19 2025 00:59:22
Script start
Timing: Jan 19 2025 00:59:22
Module start 'content'
Timing: Jan 19 2025 00:59:23
Module end 'content'
Timing: Jan 19 2025 00:59:24
Script end

Main resources:

Total runtime1.5429 sec
Peak memory usage4,096.0000 KB
Database Queries219

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 589.2109180.7969
Module start 'content' 0.00771.4003 770.0078707.0391
Module end 'content' 1.40800.1349 1,477.0469344.4297
Script end 1.5429  1,821.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2580210.0002
Check MTime0.00150.0966210.0001
Mysql Total
Database connection0.00090.060510.0009
Mysqli_queries1.427692.52152190.0065
Looping result0.00250.16442170.0000
Template Total1.495596.920.7477
Template load0.00260.167920.0013
Template processing1.492896.753020.7464
Template load and register function0.00010.005010.0001
states
state_id_array0.00100.066810.0010
state_identifier_array0.00140.092120.0007
Override
Cache load0.00230.1515840.0000
Sytem overhead
Fetch class attribute can translate value0.00110.069950.0002
Fetch class attribute name0.00130.0827120.0001
XML
Image XML parsing0.00130.084250.0003
class_abstraction
Instantiating content class attribute0.00000.0021160.0000
General
dbfile0.00760.4929330.0002
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 48
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs