2 workflows on the same trigger

Author Message

Pascal France

Thursday 11 February 2010 9:48:12 am

Hi,

1°/ I would like to know if we can link 2 workflows ("Moderation of comments - Event/Approve" and "Delay publish - Event/Wait until") with the same trigger (content/publish/before) ?

What should I do for my 2 workflow work ?

2°/ On an ez 42 webin test installation I try to setup a single worflow with "Wait until" event. But it doesen't work (hide and unpublidh work fine).

I try to setup this workflow for the defaut article (ID=17) class object which comes with ezwebin.

a/ I create, in the "Standard" workflow group, a new process named "Attendre"

b/ I select the "Article" class (and click to "Update attributs")

c/ I select the "Publish date" attribut (ans click to "Select attribut")

d/ I validate with Ok

e/ In the Trigger page I link "Attendre" with "Content/publidh/before"

When I create a new article and I specify a publish date, the article is sent to My account->Pendding elements.

But the command:

php runcronjobs -s test

<code>

Using siteaccess test for cronjob
Running cronjobs/unpublish.php
Running cronjobs/rssimport.php
Running cronjobs/indexcontent.php
Starting processing pending search engine modifications
Done
Running cronjobs/hide.php
Running cronjobs/subtreeexpirycleanup.php
Running cronjobs/internal_drafts_cleanup.php
Cleaning up internal drafts...
Cleaned up 0 internal drafts
Running cronjobs/indexcontent.php
Starting processing pending search engine modifications
Done
Running cronjobs/hide.php
Running cronjobs/subtreeexpirycleanup.php
Running cronjobs/internal_drafts_cleanup.php
Cleaning up internal drafts...
Cleaned up 0 internal drafts
</code>

has no effect and the article is never published.

I don't understand what is the matter.

Thank's for your help

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Robin Muilwijk

Thursday 25 February 2010 11:29:02 am

Hi Pascal,

Have you been able to solve your problem yet? If not, what if you try running the "runcronjobs -frequent" part? The frequent part of the cronjobs runs the workflow.php. (http://ez.no/doc/ez_publish/technical_manual/4_x/features/cronjobs/configuring_cronjobs).

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Gaetano Giunta

Thursday 25 February 2010 3:37:34 pm

As Robin stated, by default the workflow cronjob is part of the frequent group (or 'part', in ez parlance)

the command is: php runcronjobs -s test frequent

As for wait+approve, just add the two events in the same workflow. Put approve first, otherwise approvers will have to wait before being able to approve. The end result is that content will have to be approved first and then wait until the established date before it is shown.

Principal Consultant International Business
Member of the Community Project Board

Pascal France

Friday 26 February 2010 7:17:11 am

Thank's Robin and Gaetano ;-)

Of course, all is written in the doc...

About my first point (2 workflows with 1 trigger) I think I was not clear enough.

In fact, I have some objects (class object = class_one) which have to be approuved and other ones (class object = class_tow) which have to be delayed.

And I don't know how to do that.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Friday 26 February 2010 7:34:56 am

In fact, the solution proposed by Gaetano works perfectly for what I wish to achieve.

Thanks again for your help.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

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 31 2025 00:23:55
Script start
Timing: Jan 31 2025 00:23:55
Module start 'layout'
Timing: Jan 31 2025 00:23:55
Module start 'content'
Timing: Jan 31 2025 00:23:55
Module end 'content'
Timing: Jan 31 2025 00:23:55
Script end

Main resources:

Total runtime0.0215 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.2500151.2266
Module start 'layout' 0.00450.0039 739.4766220.7188
Module start 'content' 0.00840.0116 960.19531,001.8203
Module end 'content' 0.02000.0015 1,962.015637.9922
Script end 0.0215  2,000.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.9431140.0002
Check MTime0.00114.8970140.0001
Mysql Total
Database connection0.00073.063210.0007
Mysqli_queries0.002310.749030.0008
Looping result0.00000.065310.0000
Template Total0.00115.310.0011
Template load0.00083.936410.0008
Template processing0.00031.336810.0003
Override
Cache load0.00062.706910.0006
General
dbfile0.00052.521080.0001
String conversion0.00000.035440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs