Activity to pause or break Workflow
Non planifiéeIn most scripting scenarios, when debugging or troubleshooting a script, the ability to pause or break the script at specific points, then resume the script from the breakpoint is a vital function. This functionality presently does not exist in Workflows, and it should, especially when working in VSM, where the debug console can be very frustrating to work with.
To get around this, I have taken to creating a sub workflow in my Workflows that has, if needed, Evaluate Expression activities for each object I need to check the state of at that specific point, then enters into a form with a single button that closes (cancels) the form when done. While the form is open, I am able to check the debug console for all outputs prior to the pause. When I am done, I click the Close button, thus resuming the workflow. This allows me to check the state of an object both prior to and after updates, allowing me to verify proper handling or discover issues.
This is a very simplistic sub workflow, but it does take time to create and modify for each type of use; not to mention making sure I keep track of where I place them. This is not a perfect solution though, as I have found that sometimes placing a form at certain points can cause errors in my Workflows not to mention that in VSM I cannot see my actual Workflow forms until I dismiss my pause form, which then resumes the Workflow. What would be better, is if there were an Activity that performed the same, or similar, function of pausing a workflow, but had a modal form specifically designed to be visible but out of the way. It would be fantastic if it could also be provided a list of objects that it could evaluate and provide current result states on, but that's not a priority.
Please consider this for future releases.
-
Hi Randy!
As a easy workaround you can use a “debugger;” keyword inside an evaluate expression to create a debug point that will stop the process automatically if you have the browser devtools opened.1 -
Victor Catalán thanks for the tip! Do you know offhand if that works in VSM/VSG as well?
0 -
In trying to use it w/ VSM/VSG, it does not appear to work. No errors given; it just does not pause the workflow.
0 -
The debugger command is unique to JavaScript/TypeScript. Sadly there doesn't seem to be an equivalent in C#. With .NET code being compiled before execution, it'd be a bit more complicated to add some kind of debugging on the fly like that.
We could potentially add the ability to add some kind of “pause” or “debug” property on activities in the designer and then handle it in some special way at runtime.
0 -
Ken Lyon That's what I am doing with my sub workflow, but probably not very elegantly or efficiently. Given your internal working knowledge of the JavaScript to .NET cross compiling that VSM is doing, I'm sure you'd be able to work out a much more effective solution that could be contained w/in a single workflow, rather than my solution of offloading that into a sub workflow every time.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
5 commentaires