cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide custom workflow in share workflow dropdown

kavilash23
Champ on-the-rise
Champ on-the-rise
Hi Guys,

I have created a custom workflow which is triggered by a cron job.

So how can I hide the workflow from appearing in Share Drop Down Menu when a user clicks on 'start workflow' action?

Please advice!
3 REPLIES 3

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi,

There is  ftl  file  in  alfresco4.0.2\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\workflow\start-workflow.get.html.ftl .

Make changes in the below code and add if else block  for your custom workflow in below block:

[<#list workflowDefinitions as workflowDefinition>
         {
            name: "${workflowDefinition.name!""?js_string}",
            title: "${workflowDefinition.title!""?js_string}",
            description: "${workflowDefinition.description!""?js_string}"
         }<#if workflowDefinition_has_next>,</#if>
      </#list>]

Thanks,

amandaluniz_z
Champ on-the-rise
Champ on-the-rise
It's a matter of configuring the hidden workflows in Share.

You'll need to overwrite the following config in shre-config-custom.xml


<!– Workflow config section –>
   <config evaluator="string-compare" condition="Workflow" replace="true">
      <!– A list of workflow definitions that are NOT displayed in Share –>
      <hidden-workflows>
         <!– Hide all WCM related workflows –>
         <workflow name="jbpm$wcmwf:*"/>
         <workflow name="jbpm$wf:articleapproval"/>
         <workflow name="jbpm$inwf:invitation-nominated"/>
         <workflow name="jbpm$imwf:invitation-moderated"/>
         <workflow name="jbpm$my:workflow"/>
      </hidden-workflows>

      <!– A list of workflow tasks that are NOT displayed in Share  –>
      <hidden-tasks>
         <!– Hide all WCM related tasks –>
         <task type="wcmwf:*"/>
      </hidden-tasks>
   </config>

That configuration belongs to 3.4. For version 4 it would be the same but with the proper workflow engine prefix:


<!– Workflow config section –>
   <config evaluator="string-compare" condition="Workflow">
      <!– A list of workflow definitions that are NOT displayed in Share –>
      <hidden-workflows>
         <!– Hide all WCM related workflows –>
         <workflow name="jbpm$wcmwf:*"/>
         <workflow name="jbpm$wf:articleapproval"/>
         <!– Hide publishing workflows –>
         <workflow name="activiti$publishWebContent"/>
         <workflow name="jbpm$publishWebContent"/>
         <!– Hide invitation workflows –>
         <workflow name="jbpm$inwf:invitation-nominated"/>
         <workflow name="jbpm$imwf:invitation-moderated"/>
         <workflow name="activiti$activitiInvitationModerated"/>
         <workflow name="activiti$activitiInvitationNominated"/>
         <workflow name="jbpm$my:workflow"/>
         <workflow name="activiti$myWorkflow"/>
      </hidden-workflows>

      <!– A list of workflow tasks that are NOT displayed in Share  –>
      <hidden-tasks>
         <!– Hide all WCM related tasks –>
         <task type="wcmwf:*"/>
      </hidden-tasks>
   </config>

Hope this helps

Regards,
Adei

kavilash23
Champ on-the-rise
Champ on-the-rise
Thank you very much for your help Amita and Adei.