我可以在 jbpm v3.2 中向任务节点添加运行时转换吗?

发布于 2024-09-26 22:57:45 字数 110 浏览 1 评论 0原文

对于流程定义中的每个任务节点,我想动态(以编程方式)向每个任务节点添加自转换(从同一节点转换到同一节点)。您能告诉我这可以作为 JBPM v3.2 的一部分来完成吗?如果我选择这种方法,是否会出现任何问题?

For every task node in a process definition, i want to dynamically (programtically) add a self transition (from and to transition to the same node) to each task node. Can you tell me can this be done as part of JBPM v3.2 and if there are any issues that can crop up if i choose this approach ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花间憩 2024-10-03 22:57:45

您不需要动态地执行此操作。您可以直接在您的工作流程中执行此操作。

你的动态是什么意思?当您正在部署工作流程时或已经在处理它时?

如果是在部署时,在调用deployProcessDefinition方法之前,您可以获取将要部署的xml并在部署之前对其进行编辑。

如果是在您已经在处理时,我可以想到 2 个可能的选项:

  1. 如果您希望在进行自我转换时创建任务的新实例,则需要在数据库中进行一些修改以更改已经存在的任务实例。部署的工作流程;
  2. 如果可以使用任务的同一实例,则可以更改 Transition.take 方法,以便在转换到同一任务时不传播事件。

对于这两个选项,您应该注意 ProcessLog 的问题。我不知道 JBPM 在为并不存在的转换编写日志时是否会遇到问题。

You don't need to do this dinamically. You can do it straight into your workflow.

What do you mean dinamically? When you are deploying the workflow or while you are already processing it?

If it is while deploying, before you call the deployProcessDefinition method, you can take the xml it will deploy and edit it before making the deploy.

If it is while you are already processing, I can think of 2 possible options:

  1. If you want a new instance of the task to be created when the self transition is taken, you will need to make some hacks in the database to change the already deployed workflow;
  2. If it is ok to use the same instance of the task, you can change the Transition.take method to don't propagate the event when you take the transition to the same task.

For both options, you should pay atention for problems with the ProcessLog. I don't know if JBPM will have a problem for writing the logs for transitions that don't really exist.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文