Idea Details

Each restart, no matter how it is triggered, should increase the counter &$RESTART_COUNT#

Last activity 07-17-2019 09:25 AM
Tim Quakulinsky's profile image
04-13-2018 04:40 PM

#FOKUS
There are different ways to restart a task, but the predefined variable &$RESTART_COUNT# only count restarts which were done by RESTART TASK in Post-Conditions.

There are different ways to restart a task, e.g. UserInterface/AWI, script-function RESTART_UC_OBJECT and Post-Conditions (RESTART TASK). Unfortunately, only restarts are counted, which are performed by RESTART TASK (Post-Conditions). For usability reasons, the restarts by other actions should also be counted. In our view, this behavior would be what the user expects (--> consistency).

Request: Each restart, no matter how it is triggered, should increase the counter &$RESTART_COUNT#. For consistency also the script function SYS_ACT_RESTART_COUNT must be changed.

See also PRB00118033.
Legacy enhancement request ID: PMPER-1645


Comments

07-17-2019 09:25 AM

I just started using this variable and IMO - an alternate variable should be created.  People that are using this existing variable will expect it to behave as is.  If you change it - then they'll have to change their process accordingly.  If a NEW variable is created which now counts ALL restarts, both groups of people would be happy.   Just my 2 cents!

04-11-2019 01:58 PM

:SET &RESTARTRID# = SYS_ACT_ME_NR()
:SET &RESTARTCOUNT# = 0
:SET &CURRENTID# = SYS_ACT_RESTART_ME_NR()
:WHILE &CURRENTID# <> &RESTARTRID# OR " "
:  SET &CURRENTID# = GET_STATISTIC_DETAIL(&CURRENTID#,PARENT_ACT)
:  SET &RESTARTCOUNT# = &RESTARTCOUNT# + 1
:ENDWHILE
:IF &CURRENTID# = &RESTARTRID#
:  PRINT &RESTARTCOUNT#
:ENDIF

05-18-2018 12:47 AM

I previously had to implement via a SQLI Vara to check the restart count, so having a new system restart_count variable would make it much simpler.