sometimes revert() is called on tasks but execute() isn't

Asked by Lajos Szombath

Hi,

Can you please let me know whether or not the below behavior is expected?

I have the following flow that should revert all sub-flows once an error occurs in any of the three:
unordered_flow.Flow().add(
  linear_flow.Flow(retry=AlwaysRevertAll()).add(A1, A2),
  linear_flow.Flow(retry=AlwaysRevertAll()).add(B1, B2, B3),
  linear_flow.Flow(retry=AlwaysRevertAll()).add(C1, C2, C3)
)

When I run it via the 'serial' engine, it seems to be working as expected, but when there's an Exception in e.g. A2, sometimes revert() of tasks in the B and C sub-flows get called but the actual execute() of these tasks have never been called.

As far as I can understand, revert() should only be called on tasks of which execute() was also called before - which isn't the case here. Is this a correct assumption?

I can provide the example code/output if needed.

Many thanks,
Lajos

Question information

Language:
English Edit question
Status:
Answered
For:
taskflow Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
raoofi jhoni (raoof2345) said :
#1

Hello,

Thank you for bringing this issue to our attention. It seems like there's an inconsistency where revert() is called on tasks, but execute() isn't in some instances. Here's a summary of the reported problem:

Issue:
In certain situations, revert() is being called on tasks, but the corresponding execute() method isn't being invoked.

Details:
The specific conditions or scenarios under which this occurs were not provided. Additional information on the context or steps to reproduce the issue would be helpful for a more accurate investigation.

Expected Behavior:
Tasks that have revert() called on them should also have their corresponding execute() method invoked to maintain consistency and ensure proper task execution.

Resolution:
Investigate the specific instances or conditions where this inconsistency occurs, and ensure that the execute() method is appropriately called along with revert().

If you have any additional details or steps to reproduce the problem, please provide them to facilitate a more thorough analysis and resolution.

#FlowerDeliveryMcallenTX hopes for a quick resolution to this task execution inconsistency! 🌼 visit https://www.flowerhutmcallentx.com/

Revision history for this message
raoofi jhoni (raoof2345) said :
#2

Hi Lajos,

It seems like you are encountering unexpected behavior in your flow execution. In a well-designed workflow, the revert() method of a task should ideally only be called if its execute() method has been invoked previously. However, it appears that in your case, the revert() method of tasks in the B and C sub-flows is getting called even though their execute() methods were not triggered.

To better assist you and understand the issue, it would be helpful if you could provide the example code and output. This way, I can analyze the specific details of your implementation and offer more targeted advice or insights into the observed behavior. visit https://blooketjoin.us/mystical-blooks/

Feel free to share the relevant code snippets and any error messages or unexpected outputs you are encountering.

Best regards,
[raoof]

Revision history for this message
raoofi jhoni (raoof2345) said :
#3

Hi Lajos,

It seems like you're dealing with a specific technical issue related to taskflow, and it requires a more in-depth understanding of the code and its execution context. Without the specific code example and output, it might be challenging to pinpoint the exact problem.

However, based on your description, your understanding is correct in general. The revert() method of a task in taskflow should ideally be called only if the execute() method of that task has been called before. If you're experiencing a scenario where revert() is being called without execute(), it could be a potential issue in the taskflow implementation or how the tasks are being executed.

To provide more accurate assistance, it would be helpful if you could provide the example code and the relevant output. Feel free to share more details, and I'll do my best to help you troubleshoot the issue. visit https://bagcottage.com/best-wheeled-backpack-for-school/

Revision history for this message
raoofi jhoni (raoof2345) said :
#4

Hi there,

It sounds like you're encountering an unexpected behavior in your flow execution. Without seeing the example code and output, it's a bit challenging to pinpoint the exact issue. However, based on your description, it seems there might be a discrepancy between the revert() and execute() calls.

In general, you are correct that revert() should only be called on tasks for which execute() was previously invoked. If tasks from sub-flows B and C are having their revert() methods called without corresponding execute() calls, it could indicate a potential bug or misconfiguration.

If you could provide the example code and output, it would be much easier to offer more targeted assistance. Additionally, you might want to check the documentation or seek support from the framework or library you're using for this flow.

For more detailed discussions or troubleshooting, you can also check our resources at [https://pdfdownload.pk].

Looking forward to helping you resolve this issue!

Feel free to adjust the response based on the specific details of the code and output, and your own insights into the problem.

Revision history for this message
raoofi jhoni (raoof2345) said :
#5
Revision history for this message
raoofi jhoni (raoof2345) said :
#6

It seems like you might be facing an issue with task execution and reverting in your flow. In general, the revert() method should be called for tasks only if their execute() method was called before. If you're experiencing unexpected behavior, it could be worth checking the flow logic and how exceptions are handled.

If you need further assistance or have specific questions about your code, feel free to share the example code and output for a more in-depth analysis.

As for the URL, if you're interested in GB WhatsApp alternatives, you can check out FM WhatsApp at https://whatsmody.com/fm-whatsapp/ for the latest version and features.

Revision history for this message
raoofi jhoni (raoof2345) said :
#7

It seems like you're dealing with a specific technical issue related to taskflow, and it requires a more in-depth understanding of the code and its execution context. Without the specific code example and output, it might be challenging to pinpoint the exact problem.
https://www.nationalpatiocovers.com/

Revision history for this message
raoofi jhoni (raoof2345) said :
#8

Can you help with this problem?

Provide an answer of your own, or ask Lajos Szombath for more information if necessary.

To post a message you must log in.