Long running workflow not continuing on retry

Hello, my team has a preset template activity wherein a long running flow file is contained and the actual process is developed. In case of an exception thrown in the long running workflow the process is retried up to a number of times (we all know how finicky some selectors are) and it restarts everything and enters the long running workflow with no problem. The problem arises when the task that threw the exception initially is finished instead of continuing with the next task the execution thread continues as if the long running workflow has finished. I am unsure if this should go to help or feedback but any insight into this issue would be welcome.

Thank you.

Long running workflows and persistence are something of a speciality to me, but I’m not fully following the description of your problem.

Can you perhaps share some screenshots so I can understand your template better?

@Jsillero

Welcome to the community

It looks more like the exception is being handled and not being propagated..can you please check of show some scenario/flow to understand

Cheers

Thank you both for your fast reply and well met Anil!

Apologies for not adding screenshots in my first post, I am aware its bad praxis, but I had some security constraints to go around.

Here is the issue in a more visual format:

-Here is a simple long running workflow which replicates the error i encountered in a larger project. This is called MainProcess

it uses a single parameter, which we use to readily access constants, save the starting parameters and the process state.

-Here is the “template” which contains the long workflow. This one is named Main

The first process initalices variables and anything else we might need, “proceso” executes MainProcess and “Control de Err…” handles error, retrying the process with the same io_config (as if it were a whole retry scope) a set number of times until it works or a number of retries has been reached.

Inside MainProcess, Service Task calls this sequence, simply throws an Exception if this is the first retry instance (aka initial execution and continues otherwise).

When executed, the exception is thrown and reaches the catch contained in Proceso catches it and sends the flow to Control de Errores and the process is started once again.

It then enters the MainProcess corretly BUT ends it before executing Send Task

Which is a simple warning log.

I am at a complete loss as to why this might be and have found no way to check the internal flags or variables that might govern long workflow flow or documentation about it.

Any help as always appreciated!

This is abit confusing. It doesnt look like a long running workflow to me, it uses the canvas for sure, but it doesnt seem to have any long running tasks and couldnt persist if you are using a JObject as a variable, and there is a state machine aswell which is unclear how that fits in.

It seems like you are doing transactional processing (REFramework style) but are somewhere using a Long Running Worflow canvas, which is not the intent of that canvas type as its for Linear Processing and Process Orchestration.

Regardless, do I understand correctly, that you are processing transactionally, and you want the transactions to automatically be retried x amount of times but that is not working?

The easiest way to do that in my experience is to use the retry functionality built into queues now.

The transactions are being retried, and that works correctly, the issue is that the flow exits the sequence sooner than it should even when no exception has been thrown.


I hope this explains it properly, thank you for your time!

Unfortunately I dont think we can help further without seeing more detail.

I dont think this is related to long running workflows as you are using the canvas but thats it and could be using a flowchart.

It suggests that the error handling logic in your service task is wrong, but its impossible for us to determine that without seeing any of it in detail.

I found the issue, the invoke workflow that called the long running workflow didnt have isolate set to true, once I changed that eveything worked as it was suposed to.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.