Jump to previous task leads to no flow_task and process for the task

204 Views Asked by At

I have a flow with the logic as below:

class MyFlow(Flow):
    start = flow.Start(StartProcess).Next(this.if_A_B)
    if_A_B = flow.If(cond=lambda act: act.process.if_A_B). \
        Then(this.A).
        Else(this.B)
    A = flow.View(HandleA). \
        Next(this.B)
    B = flow.View(HandleB). \
        Next(this.if_A_C)
    if_A_C = flow.If(cond=lambda act: act.process.if_A_C). \
        Then(this.A). \
        Else(this.C)
    C = flow.View(HandleC). \
        Next(this.end)

I expect that in some case: task A done -> task B done -> if_A_C is True then activate a new task A_NEW -> task A_NEW done -> task B_NEW done.

But I find after task A is done and activate task B, the flow_task & process of B are empty. I try set process.if_A_B to False so that skip task A, then task B had flow_task & process. Another try is comment if_A_C and C, so task B's next is this.end, then after task A is done and activate task B, the flow_task & process are there.

I wonder does viewflow support directly jumping to previous task? Or I should cancel B then undo A to go from B back to A?

0

There are 0 best solutions below