com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Defining a Lifecycle

New asset types are added to ES via the ES Management Console using RXT definitions. After you define the asset type, if you have not specified an existing lifecycle, you need to define the corresponding custom lifecycle via the ES Management Console in a SCXML. For more information on configuring a lifecycle, see Lifecycle Configuration Definitions.

Sample lifecycle

<aspect name="MobileAppLifeCycle" class="org.wso2.jaggery.scxml.aspects.JaggeryTravellingPermissionLifeCycle">
   <configuration type="literal">
      <lifecycle>
         <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="Initial">
            <state id="Initial">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Create" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Created" value="Internal/private_{asset_author}:+add,+delete,+authorize" />
                        <parameter name="STATE_RULE2:Created" value="Internal/everyone:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Create" target="Created" />
            </state>
            <state id="Created">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Submit" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:In-Review" value="Internal/private_{asset_author}:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE2:In-Review" value="Internal/reviewer:+add,-delete,+authorize" />
                        <parameter name="STATE_RULE3:In-Review" value="Internal/everyone:-get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:In-Review" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Submit" target="In-Review" />
            </state>
            <state id="In-Review">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Approve" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Approved" value="Internal/private_{asset_author}:+get,+add,-delete,+authorize" />
                        <parameter name="STATE_RULE2:Approved" value="Internal/reviewer:-add,-delete,-authorize" />
                     </execution>
                     <execution forEvent="Reject" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Rejected" value="Internal/private_{asset_author}:+add,+delete,+authorize" />
                        <parameter name="STATE_RULE2:Rejected" value="Internal/reviewer:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Rejected" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Approve" target="Approved" />
               <transition event="Reject" target="Rejected" />
            </state>
            <state id="Approved">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Publish" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Published" value="Internal/private_{asset_author}:+get,+add,+delete,+authorize" />
                        <parameter name="STATE_RULE2:Published" value="Internal/reviewer:+get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Published" value="Internal/everyone:+get,-delete,-authorize" />
                        <parameter name="STATE_RULE4:Published" value="system/wso2.anonymous.role:+get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Publish" target="Published" />
            </state>
            <state id="Rejected">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Re-Submit" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:In-Review" value="Internal/private_{asset_author}:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE2:In-Review" value="Internal/reviewer:+add,-delete,+authorize" />
                        <parameter name="STATE_RULE3:In-Review" value="Internal/everyone:-get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:In-Review" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Re-Submit" target="In-Review" />
            </state>
            <state id="Published">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Unpublish" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Unpublished" value="Internal/private_{asset_author}:+add,-delete,+authorize" />
                        <parameter name="STATE_RULE2:Unpublished" value="Internal/reviewer:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Unpublished" value="Internal/everyone:-get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:Unpublished" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                     </execution>
                     <execution forEvent="Deprecate" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Deprecated" value="Internal/private_{asset_author}:+add,-delete,+authorize" />
                        <parameter name="STATE_RULE2:Deprecated" value="Internal/reviewer:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Deprecated" value="Internal/everyone:-get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:Deprecated" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Unpublish" target="Unpublished" />
               <transition event="Deprecate" target="Deprecated" />
            </state>
            <state id="Unpublished">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Publish" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Published" value="Internal/private_{asset_author}:+add,-delete,+authorize" />
                        <parameter name="STATE_RULE2:Published" value="Internal/reviewer:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Published" value="Internal/everyone:+get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:Published" value="system/wso2.anonymous.role:+get,-add,-delete,-authorize" />
                     </execution>
                     <execution forEvent="Retire" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Retired" value="Internal/private_{asset_author}:-add,+delete,-authorize" />
                        <parameter name="STATE_RULE2:Retired" value="Internal/reviewer:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Retired" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:Retired" value="Internal/everyone:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Publish" target="Published" />
               <transition event="Retire" target="Retired" />
            </state>
            <state id="Deprecated">
               <datamodel>
                  <data name="transitionExecution">
                     <execution forEvent="Retire" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
                        <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
                        <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
                        <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
                        <parameter name="PERMISSION:authorize" value="authorize" />
                        <parameter name="STATE_RULE1:Retired" value="Internal/private_{asset_author}:-add,+delete,-authorize" />
                        <parameter name="STATE_RULE2:Retired" value="Internal/reviewer:-add,-delete,-authorize" />
                        <parameter name="STATE_RULE3:Retired" value="system/wso2.anonymous.role:-get,-add,-delete,-authorize" />
                        <parameter name="STATE_RULE4:Retired" value="Internal/everyone:-get,-add,-delete,-authorize" />
                     </execution>
                  </data>
               </datamodel>
               <transition event="Retire" target="Retired" />
            </state>
            <state id="Retired" />
         </scxml>
      </lifecycle>
   </configuration>
</aspect>


The following diagram illustrates the expected states in a sample lifecycle together with the permission transitions:

You need to always add an additional lifecycle state named Initial to the expected lifecycle to derive the actual lifecycle as seen below. This additional virtual state is needed so that ES can assign the permission logic needed for the first state, which is Created. 

 


 

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.