AppWorx, Dollar Universe and Sysload Community

Expand all | Collapse all

Incrementing Substitution Variable

  • 1.  Incrementing Substitution Variable

    Posted 07-28-2014 11:39 AM

    All,


    Maybe somebody has figured out how to do this before (I hope).  I'm using UC4 V8 applications manager and we want a job in a process flow to restart itself a certain amount of times if it keeps failing.  Here's what I envisioned happening under conditions on the job:

    1) After- If status = 'ERROR' then set subvar #error_count = {#error_count} + 1 every time the condition is true
    2) After- If #error_count != 5 then RESTART ON ABORT = yes every time the condition is true.

    I have my error_count subvar set to a number data type with an initial value of zero but every time I run the process flow it changes it to a character and the value becomes 0 +1 +1 +1 +1 etc... until I kill it.  

    Has anybody ever done anything like this before?


    Thanks!
    Russ



  • 2.  Incrementing Substitution Variable

    Posted 08-05-2014 12:22 PM
    The best way to do this is to create a SUBVAR that parses the JOBID. This way you can use the same SUBVAR for any job. 

     For Oracle this is the SQL to get the restart count from the JOBID: 
    select nvl(substr('{jobid}',length(cast ({jobid} as int))+2),0) from dual 

     The condition would then be: After always true: if #restart_count LT 5 RESTART ON ABORT


  • 3.  Incrementing Substitution Variable

    Posted 03-07-2017 11:15 AM
    Hi

    I was going through this post as I am trying to accomplish the same thing. We are on AM V8.10.

    I am trying to increment the Substitution variable by 1 to use it on a condition. I increment this only once in the whole process. Please advise if you have any other solutions or if its possible with the above one.

    Thanks