posted on June 2, 2015

We have a business process where the workflow needs to report its own total duration (i.e. how long it took to run) as the very last step by assigning it to a metadata field on an entry. I don't think it's available as a token, which makes sense since at the time an activity is run, the workflow isn't quite finished yet. So what we're doing is comparing DateTime values at the very beginning and the very end and calculating their difference using a C# script, and the result is accurate enough for our needs.

Is there an easier way to do this, though? As a best practice I like keeping workflows as simple as possible and avoid any clever "hacks", since in my experience that simply makes them more difficult to maintain. Any thoughts would be appreciated.

0 0