修改alfresco中工作流列表中的类型

修改alfresco中工作流列表中的类型,alfresco,alfresco-share,alfresco-webscripts,Alfresco,Alfresco Share,Alfresco Webscripts,我正在使用Alfresco 5.0.d,希望修改下面截图中的列表 到目前为止,我得到了workflow.lib.js文件,该文件具有获取工作流类型的getWorkflowDefinitions()方法,但我无法调试这些值以理解该方法 我尝试logger.log查看值,但没有结果 有什么想法吗?关于启用JavaScript调试/infor日志检查: logger.log使用类别org.alfresco.repo.jscript.ScriptLogger 在调试级别,因此custom-log4j.

我正在使用Alfresco 5.0.d,希望修改下面截图中的列表

到目前为止,我得到了workflow.lib.js文件,该文件具有获取工作流类型的getWorkflowDefinitions()方法,但我无法调试这些值以理解该方法

我尝试logger.log查看值,但没有结果


有什么想法吗?

关于启用JavaScript调试/infor日志检查:

logger.log使用类别
org.alfresco.repo.jscript.ScriptLogger
在调试级别,因此custom-log4j.properties中的内容是正确的 (但将忽略附加器)。确保它位于的类路径中 露天/扩建。目录
tomcat/shared/classes/alfresco/extension
是您通常想要的


更新:

  • 如果您只想隐藏一些工作流,那么可能根本不需要覆盖JS控制器,请选中。它可能就是你要找的东西
  • 至于调试JS支持的WebScript,请检查

  • 您还需要在share-config或share-config-custom.xml文件中启用客户端调试器

    <flags>
         <!--
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         -->
         <client-debug>false</client-debug>
         <!--
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         -->
         <client-debug-autologging>false</client-debug-autologging>
    
         <!--
            When this is set to true any Aikau based errors will be posted back to the server and 
            captured by the server side logging. This can be useful to detect when errors occur in 
            a users browser -->
         <post-client-debug>false</post-client-debug>
      </flags>
    
    请让我知道,如果你在这方面需要任何帮助

    function getWorkflowDefinitions()
    { 
       // Get the hidden workflow list from Share-config or share-config-custom.xml
       var hiddenWorkflowNames = getHiddenWorkflowNames(),
          connector = remote.connect("alfresco"), //create connection to Alfresco repository
          //Get request to repo and telling repo ignore some of the workflows also
          result = connector.get("/api/workflow-definitions?exclude=" + hiddenWorkflowNames.join(","));
       if (result.status == 200)
       {
          var workflows = JSON.parse(result).data;
          //Sort the workflows based on their title
          workflows.sort(sortByTitle);
          return workflows;
       }
     //If there are not workflows, just return empty list to the client.
       return [];
    }
    
    
    
    <!-- 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"/>
          </hidden-workflows>