简体   繁体   English

Activiti分配/重新分配过程

[英]Activiti assign/reassign process

I am a beginner on Activiti BPM. 我是Activiti BPM的初学者。 I would like to implement a ticket process flow. 我想实现一个票务处理流程。

Say for example: Start event -> Any user can create ticket. 例如说:开始事件->任何用户都可以创建票证。 (User task) This ticket will be emailed to Manager identified by ticket type. (User task)此故障单将通过电子邮件发送给按故障单类型标识的Manager。 (Service task) - I am using service task here instead of email task as I would be using Spring/Velocity template. (Service task) -我在这里使用服务任务,而不是电子邮件任务,就像我在使用Spring / Velocity模板一样。 - In this email a URL similar to this will be sent along: -在此电子邮件中,将发送与此类似的URL:

/ticket/123/assign

Now this ticket will be claimed by the Manager who received the email. 现在,收到电子邮件的经理将索取这张票。 (User task) However he could decide to reassign this task to some other Manager. (User task)但是,他可以决定将该任务重新分配给其他经理。 This delegation process is indefinite and can be repeated any number of times by any Manager during the workflow. 此委派过程是不确定的,在工作流程中,任何经理都可以重复多次。

How do I implement this assign and reassign process in Activiti? 如何在Activiti中实现此分配和重新分配过程? Is there any suitable BPMN constructs/pattern or examples on how to achieve this in Activiti? 是否有任何合适的BPMN构造/模式或有关如何在Activiti中实现此目标的示例? Thanks. 谢谢。

  • Create process definition like this: 创建这样的流程定义:

在此处输入图片说明

  • For sending email to manager use TaskListener with event type create . 要向经理发送电子邮件,请使用事件类型为create的 TaskListener More info in http://activiti.org/userguide/#taskListeners 有关更多信息,请参见http://activiti.org/userguide/#taskListeners
  • If the process arrives to the UserTask in Activiti database is created instance of ACT_RU_TASK. 如果进程到达Activiti数据库中的UserTask ,则创建ACT_RU_TASK的实例。 There are three attributes: 有三个属性:

For your purposes, you can use Owner for first manager (who is notified by email, you can set owner in TaskListener) and Assignee for assigned manager. 出于您的目的,您可以将“所有者”用作第一位管理员(通过电子邮件通知其,您可以在TaskListener中设置所有者),并为“分配的管理员”使用“受让人”。 You can change assignee any number of times you want. 您可以任意次数更改受让人。

Activiti engine solves only process flow not UI. Activiti引擎仅解决流程而不解决UI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM