我正在使用liferay工作流。我想创建我自己的工作流定义。Liferay文档和介质Portlet的自定义工作流定义
现在使用默认工作流程“单一审批者”,它只是直接通知管理员特定文档由用户上载到文档和媒体portlet。我想要的是在这张图片中描述。
每当下组织A的用户会上传任何文件,那么它不会发出通知,批准用户主ADMIN而是应该向组织一个管理员批准的用户。
我希望我的问题是可以理解的......
每当下机构A用户会上传任何文件,那么它不会发送通知批准用户主ADMIN而是应该发送给一个组织管理员批准用户..
我希望我已经明白我的问题......
我曾经做过这样的在我的工作流程我已经单身批准的定义我已经给了该定义一个文件夹中的媒体文件和现在的portlet他们自动创建了四个角色
1)portal Legal Reviewer - Auto generated role from workflow definition
2)portal Content Reviewer - Autogenerated role from workflow definition
3)organization Legal Reviewer - Autogenerated role from workflow definition
4)organization Content Reviewer - Autogenerated role from workflow definition
现在,每当我上传的东西到该文件夹的通知去我的网站的所有者
而在有两个可选
1)assign to me
2)assign to -> users (who have role from above 4 they created automatically)
现在假设我分配到具有不同于上述角色的用户四,当我打开用户的帐户,然后没有控制面板或没有工作流任务行动,我可以显示。所以任何人都可以批准的内容?
还有一件事在那里我可以编辑XML中的作用,它会通知在XML不是默认的方式,网站所有者
只有当我创建谁拥有角色,管理员与用户所描述的特定角色组织审批者角色,仅可访问控制面板和工作流任务,他们可以找到分配和分配我通知
我的工作流程的认定中去这里
<?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>UPLOAD Approver</name>
<description>A single 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>
</transition>
</transitions>
</state>
<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>
<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>organization</role-type>
<name>Organization APPROVER</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Content Reviewer</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Owner</name>
</role>
<role>
<role-type>regular</role-type>
<name>Portal Content Reviewer</name>
</role>
<role>
<role-type>site</role-type>
<name>Site Administrator</name>
</role>
<role>
<role-type>site</role-type>
<name>Site Content Reviewer</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>
<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>
我没有将两个角色如下这是在单批准定义来自默认..
<role>
<role-type>organization</role-type>
<name>Organization Administrator</name>
</role>
<role>
<role-type>regular</role-type>
<name>Administrator</name>
</role>
所以什么正在发生,我需要给特定用户以管理员的角色还有organizationapprover但如果我给管理员权限给该用户,然后只有他可以访问控制面板,可以去工作流任务选项,但它不是真正的想法给管理员权限的用户,他们的工作只是批准的内容..所以我想,不知何故只是授权organizationapprover使用控制面板,但仅限于访问工作流任务选项。用户无法执行任何操作,而只是使用工作流任务选项。
当我在我的portlet中添加单个批准定义,然后有默认角色创建,当我给任何用户批准或审查与分配给选项的控制面板不显示,那么我怎么去该评论者的工作流任务用户帐号 –
请查看我更新的答案。 –