2017-03-21 12 views
0

我使用的是Alfresco 5.0.d,并且想要修改下面屏幕截图中显示的列表。修改即将在户外工作流程列表中的类型

select workflow

到目前为止,我这是为getWorkflowDefinitions()workflow.lib.js文件的方法用于获取工作流程的类型,但我不能够调试值理解方法。

我试图logger.log看到的值,但没有出现。

有什么想法?

回答

0

对于启用JavaScript调试/日志Infor的检查this answer

logger.log使用类别org.alfresco.repo.jscript.ScriptLogger 在级调试,所以你必须在custom-log4j.properties什么是正确的 (该附加器被忽略虽然)。确保它位于 户外/分机的班级路径中。目录 tomcat/shared/classes/alfresco/extension是你通常想要的。


UPDATE:

  1. 如果你只是想哈得少的工作流程,那么你可能并不需要在所有覆盖JS控制器,检查this link。它可能是你在找什么。
  2. 至于调试JS支持Webscripts,检查this
0

您需要启用客户端的调试器也共享配置或共享配置,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> 

getWorkflowDefinitions()方法返回在您的实例通过exclusing隐藏的工作流运行的所有工作流程。这些隐藏的工作流程列表发送回购以忽略它们。

您可以在share-config.xml文件中看到隐藏的工作流程详细信息。

我在下面的函数中添加了行内注释。

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> 

请让我知道,如果你需要任何帮助。