Workflow Participant List in WebCenter Sites

When you are using step workflows you must define the method to assign the participants in each step. To achieve this, you have three options:

  1. Choose assignees when step is taken (manually)
  2. Assign to Everyone (based on roles)
  3. Assign from list of participants

If the last option is used, the list of participants is taken from the Start Menu List. If new participants are added to the Start Menu list, new assets will have the new list, but old assets will keep the list that was initially available when the assets were created.

The old assets will be able to update the participants with the following customisation in the code /OpenMarket/Xcelerate/Actions/SetStatusPost.xml

<!-- Beginning of customisation -- The participants will be taken from the start menu list -->
      <!--The site is obtained from session variable.-->    
      <WorkflowAsset.Load ASSETTYPE="Variables.AssetType" ID="Variables.id" OBJVARNAME="workflowasset" />    
   
      <SETVAR NAME="site" VALUE="SessionVariables.pubid"/>    
   
      <!-- Asset Type definition. Do not do it for Collection because the elements asset type is obtained -->    
      <IF COND="Variables.AssetType=Collection">    
      <THEN>      
        <SETVAR NAME="subtypeAsset" VALUE="Variables.AssetType"/>    
      </THEN>    
      <ELSE>      
        <ASSET.GETSUBTYPE TYPE="Variables.AssetType" OBJECTID="Variables.id" OUTPUT="subtypeAsset" />    
      </ELSE>    
      </IF>    
   
      <!-- Participants object -->    
      <WORKFLOWENGINE.NEWPARTICIPANTS  OBJVARNAME="myParts"/>

  <!-- Workflow is obtained -->
  <WORKFLOWASSET.LOAD
          OBJVARNAME="workflowAssetObj"
          ASSETTYPE="Variables.AssetType"
          ID="Variables.id" />    
   
      <WORKFLOWENGINE.GETOBJECTWORKFLOWPROCESS
      OBJECT="workflowAssetObj"
      VARNAME="processExist" />
  <IF COND="IsVariable.processExist=false">
  <THEN>
      <LOGMSG STR="SetStatusPost - Process ends. The asset is not in workflow" />    
      </THEN>
  <ELSE>      
              <WORKFLOWENGINE.GETPROCESSID      
            OBJVARNAME="workflowprocessobjectname"
              ID="Variables.processExist" />        
       
            <WORKFLOWPROCESS.GETPROCESSNAME      
        NAME="workflowprocessobjectname"      
        VARNAME="process" />
    <INDEXOF STR="Variables.process" WHAT=":" OUTSTR="index" INDEX="0"/>
    <SUBSTRING      
            STR="Variables.process"      
            OUTSTR="beginning"      INDEX="0"      
            ENDINDEX="Variables.index"/>  

        <!-- First Site II Workflows -->    
            <IF COND="Variables.beginning=FSII">    
            <THEN>    
              <PARTICIPANTS.CLEAR NAME="myParts"/>    
              <SETVAR NAME="parts_established" VALUE="false"/>    
              <EXECSQL LIST="listSelectedUsers" TABLE="StartMenu,StartMenu_Sites,StartParticipantChoice"  SQL="SELECT c.participant,c.userrole FROM StartMenu a, StartMenu_Sites b, StartParticipantChoice c WHERE a.cs_itemtype='ContentForm' AND (a.cs_assettype = 'Variables.AssetType' and a.cs_assetsubtype='Variables.subtypeAsset') AND a.id=b.ownerid AND (b.pubid='Variables.site' or b.pubid is null) AND c.ownerid=a.id" />      
               <IF COND="listSelectedUsers.#numRows!=0">  
           <THEN>                
                                 <SETVAR NAME="parts_established" VALUE="true"/>                
                                 <LOOP LIST="listSelectedUsers">                        
                                                <!--The participant is added to the list-->                        
                                                <PARTICIPANTS.ADDPARTICIPANT NAME="myParts" ROLE="listSelectedUsers.userrole" USER="listSelectedUsers.participant" />                        
                                         </LOOP>                
                        </THEN>  
           <ELSE> <!-- There is no Start Menu for the subtype -->                
                                 <EXECSQL LIST="listSelectedUsers" TABLE="StartMenu,StartMenu_Sites,StartParticipantChoice"  SQL="SELECT c.participant,c.userrole FROM StartMenu a, StartMenu_Sites b, StartParticipantChoice c WHERE a.cs_itemtype='ContentForm' AND (a.cs_assettype = 'Variables.AssetType' and a.CS_ASSETSUBTYPE is null) AND a.id=b.ownerid AND (b.pubid='Variables.site' or b.pubid is null) AND c.ownerid=a.id" />    
   
                      <IF COND="listSelectedUsers.#numRows!=0">                        
                                                <THEN>                              
                                                              <SETVAR NAME="parts_established" VALUE="true"/>                              
                                                              <LOOP LIST="listSelectedUsers">                                  
                               
                                                        <!--The participant is added to the list-->                                    
                                                                           <PARTICIPANTS.ADDPARTICIPANT NAME="myParts" ROLE="listSelectedUsers.userrole" USER="listSelectedUsers.participant" />                                      
                                                                      </LOOP>                                
                                                        </THEN>                        
                                 </IF>                
                         </ELSE>    
            </IF>    
            <IF COND="Variables.parts_established=true">    
            <THEN>          
                           <WORKFLOWENGINE.SETOBJECTPARTICIPANTS OBJECT="workflowasset" PARTICIPANTS="myParts" />            
                    </THEN>    
            </IF>        
                 
      </IF>    
     </ELSE>
 </IF>  
 
  <!-- End of customisation -->