Bonita BPM - 如何让用户只看到他组中的任务?
Bonita BPM - How to make a user see only tasks that are in his group?
我正在使用 Bonita BPM 版本:7.2.3。
我有以下组织:
<?xml version="1.0" encoding="UTF-8"?>
<organization:Organization xmlns:organization="http://documentation.bonitasoft.com/organization-xml-schema/1.1">
<customUserInfoDefinitions/>
<users>
<user userName="requisitante1.dmae">
<firstName>Requisitante1</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="requisitante2.dmae">
<firstName>Requisitante2</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico1.dmae">
<firstName>Aprovador Técnico 1</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico2.dmae">
<firstName>Aprovador Técnico 2</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro1.dmae">
<firstName>Aprovador Financeiro 1</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro2.dmae">
<firstName>Aprovador Financeiro 2</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadoradministrativo.dmae">
<firstName>Aprovador Administrativo</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadoradministrativo.smf">
<firstName>Aprovador Administrativo</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro1.smf">
<firstName>Aprovador Financeiro 1</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">213</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro2.smf">
<firstName>Aprovador Financeiro 2</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico1.smf">
<firstName>Aprovador Técnico 1</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico2.smf">
<firstName>Aprovador Técnico 2</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="requisitante1.smf">
<firstName>Requisitante 1</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="requisitante2.smf">
<firstName>Requisitante 2</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="celic">
<firstName>CELIC</firstName>
<lastName>CELIC</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
</users>
<roles>
<role name="AprovadorTecnico">
<displayName>Aprovador Técnico</displayName>
</role>
<role name="AprovadorFinanceiro">
<displayName>Aprovador Financeiro</displayName>
</role>
<role name="AprovadorAdministrativo">
<displayName>Aprovador Administrativo</displayName>
</role>
<role name="requisitante">
<displayName>Requisitante</displayName>
</role>
<role name="celic">
<displayName>CELIC</displayName>
</role>
</roles>
<groups>
<group name="CELIC">
<displayName>CELIC</displayName>
</group>
<group name="DMAE" parentPath="/CELIC">
<displayName>DMAE</displayName>
</group>
<group name="SMF" parentPath="/CELIC">
<displayName>SMF</displayName>
</group>
</groups>
<memberships>
<membership>
<userName>requisitante1.dmae</userName>
<roleName>requisitante</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>requisitante2.dmae</userName>
<roleName>requisitante</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico1.dmae</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico2.dmae</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro1.dmae</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro2.dmae</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadoradministrativo.dmae</userName>
<roleName>AprovadorAdministrativo</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadoradministrativo.smf</userName>
<roleName>AprovadorAdministrativo</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro1.smf</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro2.smf</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico1.smf</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico2.smf</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>requisitante1.smf</userName>
<roleName>requisitante</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>requisitante2.smf</userName>
<roleName>requisitante</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>celic</userName>
<roleName>celic</roleName>
<groupName>CELIC</groupName>
</membership>
</memberships>
</organization:Organization>
以及以下流程:
最后我有了对应车道名称的演员映射(演员 Requisitante 是车道 Requisitante 的演员,角色是 Requisitante 等等)。
我希望只有组内的用户能够查看该组用户启动的任务(如果来自 "SMF" 的 "requisitante" 启动任务,则来自组 "DMAE" 即使他们具有相同的角色也看不到它,因为他们不属于相同的组)。
问题是这并没有发生。
我知道我可以通过使用用户过滤器来解决它,但我不知道这是否是最 "correct" 和最直接的解决方案。我认为这可以更简单。
用户过滤器是一种解决方案,但不是最简单的。您可以(在工作室中)将演员映射到一个角色,这将满足您的所有要求并且易于实现。
为此,您转到工作室中的 configure/actor 映射(流程配置图标)并将您的演员映射到相应的角色(例如,演员要求映射到角色要求)。这样,只有具有相关角色的用户才能看到任务处于待处理状态。
如果我的理解正确的话,您的任务是根据用户的角色映射到用户的。你也有一个约束,这取决于谁开始这个过程。给定流程实例的任务应该只对与发起者在同一组中的用户可用。
Actor 映射只能基于组织信息(即组、角色、成员资格和用户),不能基于流程实例信息(例如启动实例的用户)是动态的。
如果您需要根据流程实例的启动者等信息让用户与任务相关联,过滤器实际上是个不错的选择。过滤器可以使用任何类型的输入信息来构建用户 ID 列表。当到达任务时,过滤器实际上会被执行,因此可以访问流程实例发起者 ID(以及实例变量、外部数据...)等信息。
对于 actor,实际上是当用户登录 Bonita BPM Portal 时,基于他的成员资格引擎将找到已部署流程中定义的匹配 actor。
我正在使用 Bonita BPM 版本:7.2.3。
我有以下组织:
<?xml version="1.0" encoding="UTF-8"?>
<organization:Organization xmlns:organization="http://documentation.bonitasoft.com/organization-xml-schema/1.1">
<customUserInfoDefinitions/>
<users>
<user userName="requisitante1.dmae">
<firstName>Requisitante1</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="requisitante2.dmae">
<firstName>Requisitante2</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico1.dmae">
<firstName>Aprovador Técnico 1</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico2.dmae">
<firstName>Aprovador Técnico 2</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro1.dmae">
<firstName>Aprovador Financeiro 1</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro2.dmae">
<firstName>Aprovador Financeiro 2</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadoradministrativo.dmae">
<firstName>Aprovador Administrativo</firstName>
<lastName>DMAE</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadoradministrativo.smf">
<firstName>Aprovador Administrativo</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro1.smf">
<firstName>Aprovador Financeiro 1</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">213</password>
<customUserInfoValues/>
</user>
<user userName="aprovadorfinanceiro2.smf">
<firstName>Aprovador Financeiro 2</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico1.smf">
<firstName>Aprovador Técnico 1</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="aprovadortecnico2.smf">
<firstName>Aprovador Técnico 2</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="requisitante1.smf">
<firstName>Requisitante 1</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="requisitante2.smf">
<firstName>Requisitante 2</firstName>
<lastName>SMF</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
<user userName="celic">
<firstName>CELIC</firstName>
<lastName>CELIC</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="false">123</password>
<customUserInfoValues/>
</user>
</users>
<roles>
<role name="AprovadorTecnico">
<displayName>Aprovador Técnico</displayName>
</role>
<role name="AprovadorFinanceiro">
<displayName>Aprovador Financeiro</displayName>
</role>
<role name="AprovadorAdministrativo">
<displayName>Aprovador Administrativo</displayName>
</role>
<role name="requisitante">
<displayName>Requisitante</displayName>
</role>
<role name="celic">
<displayName>CELIC</displayName>
</role>
</roles>
<groups>
<group name="CELIC">
<displayName>CELIC</displayName>
</group>
<group name="DMAE" parentPath="/CELIC">
<displayName>DMAE</displayName>
</group>
<group name="SMF" parentPath="/CELIC">
<displayName>SMF</displayName>
</group>
</groups>
<memberships>
<membership>
<userName>requisitante1.dmae</userName>
<roleName>requisitante</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>requisitante2.dmae</userName>
<roleName>requisitante</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico1.dmae</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico2.dmae</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro1.dmae</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro2.dmae</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadoradministrativo.dmae</userName>
<roleName>AprovadorAdministrativo</roleName>
<groupName>DMAE</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadoradministrativo.smf</userName>
<roleName>AprovadorAdministrativo</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro1.smf</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadorfinanceiro2.smf</userName>
<roleName>AprovadorFinanceiro</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico1.smf</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>aprovadortecnico2.smf</userName>
<roleName>AprovadorTecnico</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>requisitante1.smf</userName>
<roleName>requisitante</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>requisitante2.smf</userName>
<roleName>requisitante</roleName>
<groupName>SMF</groupName>
<groupParentPath>/CELIC</groupParentPath>
</membership>
<membership>
<userName>celic</userName>
<roleName>celic</roleName>
<groupName>CELIC</groupName>
</membership>
</memberships>
</organization:Organization>
以及以下流程:
最后我有了对应车道名称的演员映射(演员 Requisitante 是车道 Requisitante 的演员,角色是 Requisitante 等等)。
我希望只有组内的用户能够查看该组用户启动的任务(如果来自 "SMF" 的 "requisitante" 启动任务,则来自组 "DMAE" 即使他们具有相同的角色也看不到它,因为他们不属于相同的组)。
问题是这并没有发生。 我知道我可以通过使用用户过滤器来解决它,但我不知道这是否是最 "correct" 和最直接的解决方案。我认为这可以更简单。
用户过滤器是一种解决方案,但不是最简单的。您可以(在工作室中)将演员映射到一个角色,这将满足您的所有要求并且易于实现。 为此,您转到工作室中的 configure/actor 映射(流程配置图标)并将您的演员映射到相应的角色(例如,演员要求映射到角色要求)。这样,只有具有相关角色的用户才能看到任务处于待处理状态。
如果我的理解正确的话,您的任务是根据用户的角色映射到用户的。你也有一个约束,这取决于谁开始这个过程。给定流程实例的任务应该只对与发起者在同一组中的用户可用。
Actor 映射只能基于组织信息(即组、角色、成员资格和用户),不能基于流程实例信息(例如启动实例的用户)是动态的。
如果您需要根据流程实例的启动者等信息让用户与任务相关联,过滤器实际上是个不错的选择。过滤器可以使用任何类型的输入信息来构建用户 ID 列表。当到达任务时,过滤器实际上会被执行,因此可以访问流程实例发起者 ID(以及实例变量、外部数据...)等信息。
对于 actor,实际上是当用户登录 Bonita BPM Portal 时,基于他的成员资格引擎将找到已部署流程中定义的匹配 actor。