Hi Mike, If I understood you correctly, another possible solution might be:
- delete all the tree-specific activation commands - create a default activation command that starts your workflow - create a default activation-no-workflow command that simply activates - from the workflow, call the "activation-no-workflow" command to prevent getting "in a loop" I think that ought to work as well, and saves you configuring activation commands for every tree. You'll still need special handling for the dms workspace, as the VersionCommand is different for DMS than the other workspaces. Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Mike Wilson (via Magnolia Forums) Gesendet: Mittwoch, 03. Oktober 2012 15:31 An: Magnolia User List Betreff: [magnolia-user] Re: workflow on all workspaces? Ok, so I've spent considerable time debugging this and here are my findings. I wish this behaviour was better documented. (or did I miss any docs?) [b]Findings[/b] If there are tree-specific activation commands in [code]config:/modules/adminInterface/commands/<tree>/activate/[/code] upon an activation command these will all immediately execute in the order specified. Commands in [code]config:/modules/adminInterface/commands/default/activate/[/code] will not execute. If there are no tree-specific activation commands, the command(s) in [code]config:/modules/adminInterface/commands/default/activate/[/code] will execute instead. The activation command [code]startFlow:class:info.magnolia.module.workflow.commands.ActivationFlowCommand[/code] will trigger an additional round of activation execution (if the workflow delegates to the participant command-activate) with "lost" context. Ie, this extra round will not execute the tree-specific activation commands but will instead always execute the default commands. [b]Implications[/b] When using tree-specific activation commands you will either have to explicitly specify an ActivationCommand (taking care of pushing content to subscribers) or specify an ActivationFlowCommand (that will eventually delegate to the default ActivationCommand). Otherwise your activation will not publish content. You shouldn't specify an ActivationFlowCommand for the default activation commands, as this will cause a loop delegating to a new round of activation. I think this is part of the problems that happened to me earlier. Thus, if you want to set up workflow for all workspaces you can't do this as a default command, but will instead have to add tree-specific startFlow commands to all trees. It'd be great if someone knowledgeable can confirm or oppose to my reasoning here, so I don't put the effort in to find and configure all these trees in vain. Best regards Mike -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=ee4ce885-0410-4e20-b0bc-555e27fac065 ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
