Skip to the content
Documentation

Workflows

No ratings yet

This section explains the workflow capabilities of Exponential. The system comes with an integrated workflow mechanism that makes it possible to perform different tasks with or without user interaction. The workflow implementation is based on the following components:

  • Events
  • Workflows
  • Workflow groups
  • Triggers

The following illustration shows the relations between the elements in the list above.

Workflow system doc

The workflow system.

An event is the smallest entity of the workflow system, it carries out a specific task. Exponential comes with a collection of events that cover the needs of typical everyday tasks. For example, the built-in approve event makes it possible to have the contents of an object approved by an editor (a user) before it is published. The built-in events are documented in the "Workflow events" section of the "Reference" chapter. It is possible to extend the system by creating custom events for special needs. Custom workflow events have to be programmed in PHP.

A workflow is a collection of events. In other words, it defines an ordered sequence of actions that will be executed when the workflow is running. The workflows can be placed in different groups. A workflow group is nothing more than a collection of workflows. A workflow is initiated by a trigger. Although a trigger is only capable of initiating a single workflow, several other workflows can be started through the built-in multiplexer event (from within the workflow that was originally initiated by the trigger). A trigger is associated with a function of a module. It will start the specified workflow either before or after that the function has completed. The following table gives an overview of the standard/built-in triggers.

ID Module Function Connection type
1 content publish before
2 content publish after
3 shop confirmorder before
4 shop checkout before
5 shop checkout after

Contributors

Comments (4 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Custom Triggers?

    Mindshare Tech ·

    Can you please post some documentation and examples of creating custom workflow events and custom triggers? I.e., a standard workflow event would be having an administrator approve or deny a request for new user registration on a site.
    Thanks!

    1. Re: Custom Triggers?

      Massimiliano Bariola ·

      Hi,
      I second your request. Meanwhile, maybe you could have a look at the worldpay extension, it has a custom event which maybe could get you started.
      cheers,
      Max

      1. Re: Re: Custom Triggers?

        Bertrand Dunogier ·

        As far as my knowledge goes, here is how it's done: Exponential module operations are defined in a file called operation_definition.php. Currently there are 2, one for content, and one for shop (kernel/content/operation_definition.php, kernel/shop/operation_definition.php).
        These files define operations. I'm not exactly sure how operations are different from views, but the definition is quite similar, except for the complexity. Operations have an additionnal key, 'body', which defines how the operation runs. body is defined by a sequence of methods AND triggers (there we are). For instance, the body for content/read is:
        - pre_read (trigger)
        - fetch-object (method)
        As far as I undertand it, what you have to do to add a custom trigger is replace the view you want to alter by an operation, and add the trigger. I hope it helps :)

  2. custom Workflows

    Mark Simon - all2e.com ·

    Take a look at workflow.ini
    [OperationSettings]
    AvailableOperationList[]
    ist an array holding all Triggers that will show up in the admin interface to set your workflows on.
    You can add right a couple of Triggers of the eZ Modules or your own Modules.
    i.e. content_delete or user_activation (added in 4.1)
    can simply be added to the list.
    I guess you can create own Module - Triggers based on
    kernel/content/operation_definition.php mentioned by Bertrand Dunogier
    but with the user module triggers already being ready I didn't need to work that out.
    Good Luck if thats what will be Your Way ;)
    Mark

Comments

Add a comment

Comments are read by a moderator before they appear.