Determining if a microflow will finish

I have a relatively long and complex microflow, and a finite amount of metaobjects that I want to run it on. Is there any way in which I can determine (in advance) if the microflow will finish at all? At the moment I'm not using any Java actions, but I might want to include some later.
3 answers

This sounds like a formulation of the Halting Problem.

From wikipedia,

In computability theory, the halting problem is a decision problem which can be stated as follows: given a description of a program, decide whether the program finishes running or will run forever. This is equivalent to the problem of deciding, given a program and an input, whether the program will eventually halt when run with that input, or will run forever.

Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist. We say that the halting problem is undecidable over Turing machines.

I haven't given much thought to implementing a Turing machine using Microflows, but if you're calling Java code it's pretty much game over.

So, I'd say no. If you find a solution, I'd sure like to hear about it.


No not in advance, you can do it afterwards by setting a datetime variable at the start of your microflow with the token [%CurrentDateTime%]. At the end you can compare this one with the [%CurrentDateTime%] at the end of your microflow with for instance the expression millisecondsBetween($DateTimeAtStart, [%CurrentDateTime%]).

You can use this expression in for instance a send text message activity to show the user the time it took to execute the microflow, but there are many other places to use the expression output (attributes, log etc.).

I hope this idea will be of some use.


A similar question is already posted on the forum. For that question click here.