Automic Community

Expand all | Collapse all

Notification to be setup on a Job for Job running more than Average Run Time in Appworx

  • 1.  Notification to be setup on a Job for Job running more than Average Run Time in Appworx

    Posted 02-08-2019 03:49 PM

    Hi Team,

     

    We want too set a notification on Jobs and Chains running for more than 1 minute in Appworx.

     

    We ahad already set it under conditions by doing:

     

    Timing: During || Condition : Run time

    If Run time : > || 00:01:00

    Action : Command : Send Notification || Action Timing : Every Time condition is True

     

    The alert is not correct and not sending notification correctly.

    Kindly let us know how to set the notification.

     

    Regards,

    Mohd Zain Akbar



  • 2.  Re: Notification to be setup on a Job for Job running more than Average Run Time in Appworx

    Posted 02-11-2019 05:25 PM

    Hi Mohd,

     

    Please keep in mind that Applications Manager is not a true real time Application, our processes sleep and wake which can occur anywhere from 30 to 60 seconds on some processes such as condition evaluation depending on load at the time. This means that a Job may run 59 seconds before condition evaluation occurs and another condition evaluation may not occur for another 30 or 60 seconds. Additionally the during condition has a minimum of 60 seconds before it is re-evaluated. This is documented in the documentation here. A screenshot of the parameter is below:

     

    during wait

     

    The combination of our sleep/wake process and during_wait parameter could mean that a Job can essentially start and finish within 2 to even 3 minutes minutes without the condition evaluation occurring. However, if the Job is running 3 or 4 minutes without the condition ever evaluating, there may be an issue with Applications Manager or the configuration. In version 8, we have had issues where notifications sometimes can stop working until the RMI is restarted. This should only apply if all notifications suddenly stop working.

     

    Below I set up a similar configuration and it works for me:

     

    The condition

    cond detail

     

    The details

    not detail

     

    I set this condition to a Job that runs longer then 2 minutes and you can see the notification being sent in the output tab

    email message

     

    If you are not seeing the notification in the output tab, it was not sent or the evaluation never too place either due to an error or because the Job took longer than 1 minute but finished faster then the next condition evaluation time. You can enable server/rmi debug and enable condition debugging to easily see if condition evaluation is occurring.

     

    Condition debug can be enabled in the Automation Engine Options (edit master's local agent)

    cond debug

     

    After enabling condition debugging and allowing the Job to run and finish, you can review the RmiServer<timestamp>.log and you will see condition evaluation similar to below:

     

    14:15:10.562 Thread-25: .Condition: COND: 120 DURING [00:00:41 > 00:01:00] False SEND NOTIFICATION
    14:16:10.562 Thread-25: .Condition: COND: 120 DURING [RUN TIME > 00:01:00] True SEND NOTIFICATION  [ 00:01:41 > 00:01:00 ]

    14:16:10.562 Thread-25: .NotificationAction: execute SEND NOTIFICATION 1MIN_LONG_RUN COND

     

    As you can see from the log file, the first evaluation occurs at 41 seconds and the second evaluation occurs at 1 minute 41 seconds. Additionally, you can see the execution of the the notification being sent here as well. Please keep in mind that this is a test system with no Jobs running, so in a busy system, it can be easily possible that the next evaluation time to not occur until after 2 or so minutes. Hopefully this helps.

     

    Regards,

    Phearith Mao