JBoss.orgCommunity Documentation
A lifecycle is defined by a simple vertical workflow with steps (states) and profiles (membership). Each lifecycle is related to a Publication plugin (compliant with the JBPM or Bonita business processes).
For example: Two lifecycles with/without states
<external-component-plugins>
<target-component>org.exoplatform.services.wcm.publication.PublicationManager</target-component>
<component-plugin>
<name>AddLifecycle</name>
<set-method>addLifecycle</set-method>
<type>org.exoplatform.services.wcm.publication.lifecycles.StatesLifecyclePlugin</type>
<init-params>
<object-param>
<name>lifecyles</name>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig">
<field name="lifecycles">
<collection type="java.util.ArrayList">
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$Lifecycle">
<field name="name">
<string>lifecycle1</string>
</field>
<field name="publicationPlugin">
<string>States and versions based publication</string>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$Lifecycle">
<field name="name">
<string>lifecycle2</string>
</field>
<field name="publicationPlugin">
<string>Authoring publication</string>
</field>
<field name="states">
<collection type="java.util.ArrayList">
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>draft</string>
</field>
<field name="memberships">
<collection type="java.util.ArrayList">
<value>
<string>author:/CA/communicationDG</string>
</value>
<value>
<string>author:/CA/alerteSanitaire</string>
</value>
<value>
<string>author:/CA/alerteInformatique</string>
</value>
<value>
<string>author:/CA/informations</string>
</value>
</collection>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>pending</string>
</field>
<field name="membership">
<string>author:/platform/web-contributors</string>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>approved</string>
</field>
<field name="membership">
<string>manager:/platform/web-contributors</string>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>staged</string>
</field>
<field name="membership">
<string>publisher:/platform/web-contributors</string>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>published</string>
</field>
<field name="membership">
<string>automatic</string>
</field>
</object>
</value>
</collection>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$Lifecycle">
<field name="name">
<string>lifecycle3</string>
</field>
<field name="publicationPlugin">
<string>Authoring publication</string>
</field>
<field name="states">
<collection type="java.util.ArrayList">
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>draft</string>
</field>
<field name="membership">
<string>author:/platform/web-contributors</string>
</field>
</object>
</value>
<value>
<object type="org.exoplatform.services.wcm.publication.lifecycles.impl.LifecyclesConfig$State">
<field name="state">
<string>published</string>
</field>
<field name="memberships">
<collection type="java.util.ArrayList">
<value>
<string>publisher:/CA/communicationDG</string>
</value>
<value>
<string>publisher:/CA/alerteSanitaire</string>
</value>
<value>
<string>publisher:/CA/alerteInformatique</string>
</value>
<value>
<string>publisher:/CA/informations</string>
</value>
</collection>
</field>
</object>
</value>
</collection>
</field>
</object>
</value>
</collection>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
In the last example, there are three lifecycles:
Lifecycle 1: Based on StatesAndVersionsPublicationPlugin .
This allows to be backward compliant with older Content releases. If all your site contents are using an existing plugin, you can create a lifecycle for it and it will work.
For new instances, you should use the new plugin with dynamic states capabilities.
Lifecycle 2: Based on AuthoringPublicationPlugin .
Visibility: Define only the "visible" steps. In this example, there is no step for "enrolled". Even if this step exists, it will not be displayed in the UI.
Automatic: Set a step as "automatic". In this mode, the step will be visible in the UI but it will be managed by the system (e.g. a cron job).
Lifecycle 3: Simulates the StatesAndVersionsPublicationPlugin plugin. Note that this simple lifecycle will work in a single server configuration.