2012-12-11 66 views
3

我正在使用Liferay 6.1.1 CE。我創建了一個多級kaleo工作流,通過在xml文件中編寫定義並將其加載到服務器。它工作正常。Liferay kaleo工作流程不起作用

我的問題是在角色分配。我創建了2個角色,項目經理和主持人,也將這個角色分配給了兩個用戶。

但工作流程無法正常工作。當我給這個用戶提供門戶內容審閱者角色時,它可以工作。我的第一個任務是審查,第二個建議。

在advance.this幫助me..thanks是我的代碼

<?xml version="1.0"?> 
<workflow-definition 
xmlns="urn:liferay.com:liferay-workflow_6.1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="urn:liferay.com:liferay-workflow_6.1.0 
http://www.liferay.com/dtd/liferay-workflow-definition_6_1_0.xsd"> 
<name>leave workflow</name> 
<description>A sample multilevel approver can approve a workflow 
content.</description> 
<version>1</version> 
<state> 
<name>created</name> 
<metadata> 
     <![CDATA[{"xy":[36,51]}]]> 
    </metadata> 
<initial>true</initial> 
<transitions> 
    <transition> 
    <name>review</name> 
    <target>review</target> 
    <default>true</default> 
    </transition> 
</transitions> 
</state> 
    <task> 
    <name>review</name> 
    <metadata> 
     <![CDATA[{"xy":[168,36]}]]> 
    </metadata> 
    <actions> 
     <notification> 
      <name>Review Notification</name> 
      <template>You have a new submission waiting for your review in the workflow.</template> 
      <template-language>text</template-language> 
      <notification-type>email</notification-type> 
      <execution-type>onAssignment</execution-type> 
     </notification> 
     <notification> 
      <name>Review Completion Notification</name> 
      <template> 
       Your submission has been reviewed and the reviewer has applied the following ${taskComments}.</template> 
      <template-language>freemarker</template-language> 
      <notification-type>email</notification-type> 
      <recipients> 
       <user /> 
      </recipients> 
      <execution-type>onExit</execution-type> 
     </notification> 
    </actions> 
    <assignments> 
     <roles> 

      <role> 
       <role-type>regular</role-type> 
       <name>Project Manager</name> 
      </role> 


     </roles> 
    </assignments> 
    <transitions> 
     <transition> 
      <name>approve</name> 
      <target>recommended</target> 
     </transition> 
     <transition> 
      <name>reject</name> 
      <target>update</target> 
      <default>false</default> 
     </transition> 
    </transitions> 
</task> 


<task> 
    <name>recommended</name> 
    <metadata> 
     <![CDATA[{"xy":[168,36]}]]> 
    </metadata> 
    <actions> 
     <notification> 
      <name>Review Notification</name> 
      <template>You have a new submission waiting for your review in the workflow.</template> 
      <template-language>text</template-language> 
      <notification-type>email</notification-type> 
      <execution-type>onAssignment</execution-type> 
     </notification> 
     <notification> 
      <name>Review Completion Notification</name> 
      <template> 
       Your submission has been reviewed and the reviewer has applied the following ${taskComments}.</template> 
      <template-language>freemarker</template-language> 
      <notification-type>email</notification-type> 
      <recipients> 
       <user /> 
      </recipients> 
      <execution-type>onExit</execution-type> 
     </notification> 
    </actions> 
    <assignments> 
     <roles> 

      <role> 
       <role-type>regular</role-type> 
       <name>Hos</name> 
      </role> 


     </roles> 
    </assignments> 
    <transitions> 
     <transition> 
      <name>approve</name> 
      <target>approved</target> 
     </transition> 
     <transition> 
      <name>reject</name> 
      <target>update</target> 
      <default>false</default> 
     </transition> 
    </transitions> 
</task> 


    <task> 
    <name>update</name> 
    <metadata> 
     <![CDATA[{"transitions":{"resubmit":{"bendpoints":[[303,140]]}},"xy":[328,199]}]]> 
    </metadata> 
    <actions> 
     <action> 
      <name>reject</name> 
      <script> 
       <![CDATA[Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus 

(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("denied"), workflowContext); 
        Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus 

(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("pending"), workflowContext); 
       ]]> 
      </script> 
      <script-language>javascript</script-language> 
      <execution-type>onAssignment</execution-type> 
     </action> 
     <notification> 
      <name>Creator Modification Notification</name> 
      <template>Your submission was rejected by a reviewer, please modify and resubmit.</template> 
      <template-language>text</template-language> 
      <notification-type>email</notification-type> 
      <execution-type>onAssignment</execution-type> 
     </notification> 
    </actions> 
    <assignments> 
     <user /> 
    </assignments> 
    <transitions> 
     <transition> 
      <name>resubmit</name> 
      <target>review</target> 
     </transition> 
    </transitions> 
</task> 
<state> 
    <name>approved</name> 
    <metadata> 
     <![CDATA[ 
      {"xy":[380,51]} 
     ]]> 
    </metadata> 
    <actions> 
     <action> 
      <name>approve</name> 
      <script> 
       <![CDATA[ 
        Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus 

    (Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("approved"), workflowContext); 
       ]]> 
      </script> 
      <script-language>javascript</script-language> 
      <execution-type>onEntry</execution-type> 
     </action> 
    </actions> 
</state> 
</workflow-definition> 
+0

喂...我下載和部署Kaleo工作流,並用它 普拉迪普布哈特:它僅僅提供2狀態 接受和拒絕 現在我要提供同樣的這種單一的審批機制,但有三個國家 1)Accpet 2)拒絕3)重新提交 你能直接告訴我 ? –

回答

1

添加所有用戶在同一組。你的工作流程沒有錯。

還要檢查權限

+0

是的...你是正確的..與組策略問題。感謝 –

+0

請幫我... –

+0

在審查任務,你可以添加您的過渡.create任務名爲「重新提交」,然後目標的新過渡設置爲您的新「重新提交」任務。 – Sree