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.