Version 28

    Description

     

    The CMS Approval Workflow feature can be optionally turned on so that, every file that is created or updated needs to go through an Approval process before it can be

    published to go Live. The current implementation, creates a pending queue for managers. The managers can then either approve or reject the publishing

    of the document in question.

     


     

    How to Use

     

    In the CMS Admin Tool, when you are viewing a particular file, there is a Pending Queue that will show up if there are any items for this file. If you are a Workflow Manager you will also see an Approve and Deny links that will let you publish this content.

     

    In the Select Action menu box, if you are a Workflow Manager, a menu item called Pending Items will be present. Clicking this menu item will result in a screen that will show you all the pending items that need to be published.

     


     

    Availability

     

    • JBoss Portal 2.6 Alpha 1

     


     

     

    How to activate this feature?

     

    • In the following file jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml activate this feature on the org.jboss.portal.cms.impl.jcr.JCRCMS MBean

     

     

         <mbean
          code="org.jboss.portal.cms.impl.jcr.JCRCMS"
          name="portal:service=CMS"
          xmbean-dd=""
          xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
          <xmbean></xmbean>
          <!-- The datasource hibernate depends on, it can be commented when the file store is used -->
          <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
          <depends>portal:service=JAASLoginModule</depends>
          <depends>portal:service=Hibernate,type=CMS</depends>
          <depends>portal:service=Module,type=IdentityServiceController</depends>
          <!--depends optional-attribute-name="UserModule" proxy-type="attribute">portal:service=Module,type=User</depends-->
    
    
    
          <!-- Uncomment this to activate publish/approval workflow integration -->
          <depends optional-attribute-name="ApprovePublishWorkflow" proxy-type="attribute">portal:service=ApprovePublish,type=Workflow</depends>
    
    
    
          <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends>            
          <attribute name="DoChecking">true</attribute>
          <attribute name="DefaultContentLocation">portal/cms/conf/default-content/default/</attribute>
          <attribute name="DefaultLocale">en</attribute>
          <attribute name="RepositoryName">PortalRepository</attribute>
          <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>      
          <attribute name="Config">
    

     

     


     

     

    How to customize the Workflow?

     

    • This can be done my customizing the following file jboss-portal.sar/portal-cms.sar/portal-workflow.sar/META-INF/jboss-service.xml

     

         <!-- ApprovePublish workflow service -->   
         <mbean
          code="org.jboss.portal.workflow.cms.ApprovePublishImpl"
          name="portal:service=ApprovePublish,type=Workflow"
          xmbean-dd=""
          xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
          <xmbean></xmbean>
          <depends optional-attribute-name="WorkflowService" proxy-type="attribute">
               portal:service=Workflow,type=WorkflowService
          </depends>
          <!-- JBPM process definition -->
          <attribute name="Process">
               <![CDATA[                
                    <!-- cms approval workflow -->
                         <process-definition name="approval_workflow">
                    <start-state>
                         <transition to="request_approval"></transition>                               
                      </start-state>
                      <task-node name="request_approval" signal="first">
                        <task name="approve_publish">
                          <assignment class="org.jboss.portal.core.workflow.cms.PublishAssignmentHandler"></assignment>
                          <event type="task-start">
                               <action class="org.jboss.portal.cms.workflow.FinalizePublish"></action>     
                          </event>
                          <exception-handler>
                               <action class="org.jboss.portal.workflow.cms.TaskExceptionHandler"></action>     
                          </exception-handler>
                        </task>                    
                        <transition name="approval" to="end"></transition>                                           
                       <transition name="rejection" to="end"></transition>                            
                      </task-node>                     
                      <end-state name="end"></end-state>                    
                   </process-definition>                                                     
               \]\]\>
          </attribute>
          <!-- 
                      overwrite = false creates the process first time if does not exist, for
                     subsequent server restarts, this process definition remains in tact
                         
                     overwrite = true creates the process first time if does not exist,
                     for subsequent server restarts, it creates a new version of the process definition
                     which will be used for processes created from then onwards. Old processes created
                     for an older version of the definition remain in tact and use their corresponding
                     process definition.
                     
                     Typically use overwrite=false and overwrite=true only when a new process definition
                     related to this workflow needs to be deployed
          -->
          <attribute name="Overwrite">false</attribute>
    
    
          <!-- 
                    a comma separated list of portal roles that are designated
                    to act as workflow managers. They are allowed to 
                    approve/reject content publish requests                                 
          -->
          <attribute name="ManagerRoles">Admin</attribute>    
    
    
          <attribute name="JNDIName">java:portal/ApprovePublishWorkflow</attribute>  
       </mbean>
    

     

    • ManagerRoles = a comma separated list of portal roles that are designated to act as workflow managers. They are allowed to approve/reject content publish requests