【问题标题】:Liferay kaleo Workflow isn't workingLiferay kaleo 工作流程不工作
【发布时间】:2012-12-11 09:34:15
【问题描述】:

我正在使用 Liferay 6.1.1 CE。通过在 xml 文件中编写定义并将其加载到服务器,我创建了一个多级 kaleo 工作流。它工作正常。

我的问题在于角色分配。我创建了 2 个角色,项目经理和 hos,也将此角色分配给了两个用户。

但工作流程不起作用。当我将门户内容审阅者角色授予此用户时,它可以工作。我的第一个任务是复习,第二个是推荐的。

帮帮我..提前谢谢。这是我的代码

<?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>

【问题讨论】:

  • 您好...我下载并部署 Kaleo 工作流并使用它 Pradip Bhatt:它只提供 2 种状态接受和拒绝 现在我必须提供相同的这种单一批准机制,但具有三种状态 1) 接受 2 )Reject 3)Re-Submit 你能指导我吗?

标签: java eclipse liferay liferay-6


【解决方案1】:

添加同一组中的所有用户。您的工作流程没有任何问题。

还要检查权限

【讨论】:

  • 在审核任务中,您可以添加名为“重新提交”的转换 .create 任务,然后将新转换的目标设置为新的“重新提交”任务。
  • 你在“重新提交”中需要什么功能..说清楚,我会帮助你
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-07
  • 2016-12-28
相关资源
最近更新 更多