h1. Fields
*Object type*: _org.exoplatform.services.wcm.extensions.publication.lifecycle.impl.LifecyclesConfig_
||*Name*||*Type*||*Default Value*||*Description*||
|*lifecycles*|{{array list}}|{{java.util.ArrayList}}|The list of lifecycles.|


*Object type*: _org.exoplatform.services.wcm.extensions.publication.lifecycle.impl.LifecyclesConfig$Lifecycle_
||*Name*||*Type*||*Default Value*||*Description*||
|*name*|{{String}}|{{N/A}}|The name of the lifecycle.|
|*publicationPlugin*|{{string}}|{{Authoring publication}}|The publication plugin name.|
|*states*|{{array list}}|{{java.util.ArrayList}}|The list of the publication states.|


*Object type*: _org.exoplatform.services.wcm.extensions.publication.lifecycle.impl.LifecyclesConfig$State_
||*Name*||*Type*||*Default Value*||*Description*||
|*state*|{{string}}|{{N/A}}|The publication states: draft, pending, staged, approved or published.|
|*membership*|{{string}}|{{N/A}}|The user or group.|

*Object type*: _org.exoplatform.services.wcm.extensions.publication.context.impl.ContextConfig_
||*Name*||*Type*||*Default Value*||*Description*||
|*contexts*|{{array list}}|{{java.util.ArrayList}}|The list of contexts.|

*Object type*: _org.exoplatform.services.wcm.extensions.publication.context.impl.ContextConfig$Context_
||*Name*||*Type*||*Default Value*||*Description*||
|*name*|{{string}}|{{contextdefault}}|The context name.|
|*priority*|{{string}}|{{200}}|The context priority. The higher number indicates the higher priority. Because a site may have several lifecycles so the lifecycle with higher priority will be executed.|
|*lifecycle*|{{string}}|{{lifecycle1}}|The name of lifecycle.|

h1. Sample configuration
{code:xml}
<external-component-plugins>
  <target-component>org.exoplatform.services.wcm.extensions.publication.PublicationManager</target-component>
  <component-plugin>
    <name>AddLifecycle</name>
    <set-method>addLifecycle</set-method>
    <type>org.exoplatform.services.wcm.extensions.publication.lifecycle.StatesLifecyclePlugin</type>
    <description>Configures</description>
    <priority>1</priority>
    <init-params>
      <object-param>
        <name>lifecycles</name>
        <object type="org.exoplatform.services.wcm.extensions.publication.lifecycle.impl.LifecyclesConfig">
          <field name="lifecycles">
            <collection type="java.util.ArrayList">
              <value>
                <object type="org.exoplatform.services.wcm.extensions.publication.lifecycle.impl.LifecyclesConfig$Lifecycle">
                  <field name="name">
                    <string>lifecycle1</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.extensions.publication.lifecycle.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.extensions.publication.lifecycle.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.extensions.publication.lifecycle.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.extensions.publication.lifecycle.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.extensions.publication.lifecycle.impl.LifecyclesConfig$State">
                          <field name="state">
                            <string>published</string>
                          </field>
                          <field name="membership">
                            <string>publisher:/platform/web-contributors</string>
                          </field>
                        </object>
                      </value>
                    </collection>
                  </field>
                </object>
              </value>

            </collection>
          </field>
        </object>
      </object-param>
    </init-params>
  </component-plugin>
  <component-plugin>
    <name>AddContext</name>
    <set-method>addContext</set-method>
    <type>org.exoplatform.services.wcm.extensions.publication.context.ContextPlugin</type>
    <init-params>
      <object-param>
        <name>contexts</name>
        <object type="org.exoplatform.services.wcm.extensions.publication.context.impl.ContextConfig">
          <field name="contexts">
            <collection type="java.util.ArrayList">
              <value>
                <object type="org.exoplatform.services.wcm.extensions.publication.context.impl.ContextConfig$Context">
                  <field name="name">
                    <string>contextdefault</string>
                  </field>
                  <field name="priority">
                    <string>200</string>
                  </field>
                  <field name="lifecycle">
                    <string>lifecycle1</string>
                  </field>
                </object>
              </value>
            </collection>
          </field>
        </object>
      </object-param>
    </init-params>
  </component-plugin>
</external-component-plugins>
{code}

In which: 
* *Target-component*: {{org.exoplatform.services.wcm.extensions.publication.PublicationManager}}
* *Name*: {{AddLifecycle}}
* *Set-method*: {{addLifecycle}}
* *Type*: {{org.exoplatform.services.wcm.extensions.publication.lifecycle.StatesLifecyclePlugin}}


