Is there a way to capture the amount of time a process was paused?

Is there a way to capture the amount of time a process was paused? I experimented with process and task metrics and these don't seem to be affected when the process is paused - i.e. durations continue to grow when the process is paused. Thank you.

OriginalPostID-195809

  Discussion posts and replies are publicly visible

Parents
  • @charlesb To the best of my knowledge, there isn't any OOTB feature or Shared Component that will do the job directly for you.

    But if you observe the 'Process History' tab, you can see that each action(such as Pause, Resume etc) is recorded along with the timestamp. So this means that, if we have access to 'Process History', we can derive the total amount of duration spent by a process in particular state. 'Get Process History', a cloud approved Shared Component at https://forum.appian.com/suite/tempo/records/type/components/item/i8BCLGOdlMUpdGVqT-RV7oRg74uEGJO5CQbsn7AWpTOPFL_vruK21cW7dzOSZ4bxg/view/summary will get the data we see in the 'Process History'.

    Here's how the output of fn!getprocesshistoryinfo() from the plugin look like:
    [
    \terrorMessage=,
    \tprocStartTime=2/18/2016 3:22 AM GMT+00:00,
    \tprocessHistory=
    \ t[actionProperties=, actionTypeId=9, actionTypeName=Resume, actor=sikhivahanb, objectTypeId=112, objectTypeName=Test User PV, timeStamp=2/18/2016 9:39 PM GMT+00:00];
    \ t[actionProperties=, actionTypeId=8, actionTypeName=Pause, actor=sikhivahanb, objectTypeId=112, objectTypeName=Test User PV, timeStamp=2/18/2016 9:37 PM GMT+00:00];
    \ t[actionProperties=, actionTypeId=9, actionTypeName=Resume, actor=sikhivahanb, objectTypeId=112, objectTypeName=Test User PV, timeStamp=2/18/2016 8:04 PM GMT+00:00];
    ]

    So based on the above data, I have developed an expression which will let us know the total amount of time spent in seconds in Paused state. If needed, we can also extend the functionality to know the time spent by the process in any state and also in a nicely formatted way.

    An added advantage of this expression rule is, it keeps on counting the duration even when the last taken action on the Process is Pause.

    FYI, I have tested the expression as much as I can and it's yielding correct results. Attached an application which is built on 16.1 and I am also attaching a text file which will help you, just in case if you aren't on 16.1. Nevertheless to say, 'Get Process History' is an prerequisite.
Reply
  • @charlesb To the best of my knowledge, there isn't any OOTB feature or Shared Component that will do the job directly for you.

    But if you observe the 'Process History' tab, you can see that each action(such as Pause, Resume etc) is recorded along with the timestamp. So this means that, if we have access to 'Process History', we can derive the total amount of duration spent by a process in particular state. 'Get Process History', a cloud approved Shared Component at https://forum.appian.com/suite/tempo/records/type/components/item/i8BCLGOdlMUpdGVqT-RV7oRg74uEGJO5CQbsn7AWpTOPFL_vruK21cW7dzOSZ4bxg/view/summary will get the data we see in the 'Process History'.

    Here's how the output of fn!getprocesshistoryinfo() from the plugin look like:
    [
    \terrorMessage=,
    \tprocStartTime=2/18/2016 3:22 AM GMT+00:00,
    \tprocessHistory=
    \ t[actionProperties=, actionTypeId=9, actionTypeName=Resume, actor=sikhivahanb, objectTypeId=112, objectTypeName=Test User PV, timeStamp=2/18/2016 9:39 PM GMT+00:00];
    \ t[actionProperties=, actionTypeId=8, actionTypeName=Pause, actor=sikhivahanb, objectTypeId=112, objectTypeName=Test User PV, timeStamp=2/18/2016 9:37 PM GMT+00:00];
    \ t[actionProperties=, actionTypeId=9, actionTypeName=Resume, actor=sikhivahanb, objectTypeId=112, objectTypeName=Test User PV, timeStamp=2/18/2016 8:04 PM GMT+00:00];
    ]

    So based on the above data, I have developed an expression which will let us know the total amount of time spent in seconds in Paused state. If needed, we can also extend the functionality to know the time spent by the process in any state and also in a nicely formatted way.

    An added advantage of this expression rule is, it keeps on counting the duration even when the last taken action on the Process is Pause.

    FYI, I have tested the expression as much as I can and it's yielding correct results. Attached an application which is built on 16.1 and I am also attaching a text file which will help you, just in case if you aren't on 16.1. Nevertheless to say, 'Get Process History' is an prerequisite.
Children
No Data