和顺 / 势衡 返回所属 Agent
SH-07.03

跨阶段交接

原能力

定义一个阶段交什么、由谁验收、进入下一阶段仍需哪些证据。(细化版 p.8–9)

首选项目

Flowable(Apache-2.0(开源引擎))。 Flowable

匹配范围

流程实例与人工任务驱动阶段交接。

源码

Flowable · public interface TaskService

modules/flowable-engine/src/main/java/org/flowable/engine/TaskService.java · 46–59 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
public interface TaskService {

    /**
     * Creates a new task that is not related to any process instance.
     * 
     * The returned task is transient and must be saved with {@link #saveTask(Task)} 'manually'.
     */
    Task newTask();

    /** create a new task with a user defined task id */
    Task newTask(String taskId);

    /**
     * Create a builder for the task

Flowable · public interface RuntimeService

modules/flowable-engine/src/main/java/org/flowable/engine/RuntimeService.java · 62–75 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
public interface RuntimeService {

    /**
     * Create a {@link ProcessInstanceBuilder}, that allows to set various options for starting a process instance, as an alternative to the various startProcessInstanceByXX methods.
     */
    ProcessInstanceBuilder createProcessInstanceBuilder();

    /**
     * Create a {@link ProcessInstanceUpdateBuilder}, that allows to update various properties of a process instance.
     *
     * @param processInstanceId
     *     id of the process instance to update, cannot be null
     */
    ProcessInstanceUpdateBuilder createProcessInstanceUpdateBuilder(String processInstanceId);

实现与验收要点

验收物、责任、补证和放行条件需专用设计。