0

我检查了Process模型,发现了active_tasks方法:

    def active_tasks(self):
        """List of non finished tasks."""
        return self.flow_class.task_class._default_manager \
            .filter(process=self, finished__isnull=True) \
            .order_by('created')

这是获取待处理任务的规范方法process_instance.active_tasks.first()吗?

4

1 回答 1

0

由于 Viewflow 允许同时执行多个并行任务,因此您应该next pending task在特定情况下定义自己的含义。

作为参考,您还可以查看默认的下一个用户重定向启发式 - https://github.com/viewflow/viewflow/blob/master/viewflow/flow/views/utils.py#L12

于 2021-01-26T04:41:35.080 回答