按照提供的答案如何以编程方式创建 django ViewFlow 进程
但是,它不会在激活记录中分配(或保留)所有者信息。
@flow_start_view
def start_process(request):
request.activation.prepare(request.POST or None,)
request.activation.flow_task.owner = request.user
request.activation.flow_task.task_title = "Start Process"
在下面也尝试过,它导致错误“'ManagedStartViewActivation'对象没有属性'assign'”
@flow_start_view
def start_process(request):
request.activation.prepare(request.POST or None,)
request.activation.assign(request.user)
request.activation.flow_task.task_title = "Start Process"