Automic Workload Automation

  • 1.  how to notify if job hasn't started by a certain time?

    Posted Sep 25, 2014 08:01 PM
    Hi,

    I want to send an email notification on a job within a process flow, if the job hasn't started by a certain time.

    I know in the workflow properties settings of that job, there is a General Tab with a Time Checkpoint. I'm trying to use that and have it execute a Notification Object. But the problem I'm having is that none of the system variables available during the execution of the Notification Object have the Job Name that hasn't started.

    The system variables
    &$NAME#
    &$ALIAS#
    have either workflow name, or the name of the job running before this one.

    Initially I thought I should put it in pre-conditions, but that only got executed once the previous job has finished.

    I don't want to have to create a notification object for each job that I'm tracking.

    Does anyone do this? Any suggestions on how to get the job name?


  • 2.  how to notify if job hasn't started by a certain time?
    Best Answer

    Posted Sep 26, 2014 12:19 PM

    We created a generalized process Event that monitors tasks starting or ending at a specific time, or running between a specific starting and ending time, and to perform notification for those that don't.  This process uses a "start of cycle" concept that has been developed with “master” process flows in mind though it could be used by other flows as well.  The monitoring cycle starts and ends with the execution of the to-be-monitored flow.  Only tasks that are executed while the monitored cycle flow is active are considered though they do not have to be a task in that flow.  This technique avoids the logic necessary to determine when a task should be considered to have executed or not in some timeframe and the additional issues associated with a change of calendar day.

    This is not meant to replace existing UC4 facilities, such as Runtime Supervision (MRT/SRT) or existing purpose-built monitoring objects.  It is to be viewed as an additional tool to assist in monitoring the production environment.

    If the associated like-named monitoring objects exist at the monitored cycle flow’s activation the monitoring Event is activated.  The following objects must exist for the process to operate.  

              Event      monitored_flow_MONITOR

           Variable     monitored_flow_MONITOR_CONTROL

    The Event's Interval is 10 minutes which should provide a sufficient level of granularity for this type of process.  The interval defines the "window" of time in which the monitored task should have started or ended.  The monitor Event is stopped if, at the expiration of the next interval, the monitored cycle plan is not active.

    Themonitored_flow_MONITOR_CONTROL Variable

            Keyword                                                       Value

            a_task_name_to_monitor_start                    START=hh:mm

            a_task_name_to_monitor_end                     END=hh:mm

            a_task_name_to_monitor_between             BETWEEN=hh:mm-hh:mm

            Note:  The monitor treats any time earlier than the start of monitored_flow as occurring the next day:         e.g.: If the monitored_flow starts at 07:00 on January 1st, then a START=01:00 would be for 1:00             am on January 2nd.

    Most all of our objects share common Includes that perform many functions based upon the object’s name and type. Thus, for example, when the monitored_flow process flow starts its Process tab's include logic checks to activate the associated monitored_flow_MONITOR Event if it exists.  In addition, the Event’s Process and ! Process tabs also contain Includes that have the needed logic to perform the monitor checking and notification.

    Current monitoring logic is rather simplistic and does not consider additional task criteria such as Calendar Keywords, Inactive/skipped or a late or early start of the monitored cycle flow.  Over time it is envisioned that additional monitoring keywords and capabilities will be added.

    This has been implemented under OM V8.  Let me know if you need more detailed information.  



  • 3.  how to notify if job hasn't started by a certain time?

    Posted Sep 26, 2014 03:40 PM
    We are V9 and we create a notification workflow for each job we are tracking.  I know you said you don't want to do it this way, but its a pretty lightweight solution in my opinion. (because we don't have very many that require tracking.)

    We build a new workflow that consists of one email job.  The email job has a "CHECK HISTORY" precondition on it that causes the email process to skip if the desired job has already finished.  If the job hasn't finished by the time that this new workflow runs, then we get an email alert.

    A limitation of this solution is it is checking for object completion rather than started.  I suspect one could use the script function GET_UC_OBJECT_NR() to discover if the object is already running or not.

    Pete


  • 4.  how to notify if job hasn't started by a certain time?

    Posted Sep 29, 2014 07:37 PM
    Mark,

    Can I get more specifics?

    Currently, I'm running an external script that does a query against the underlying database and sends an email.


  • 5.  how to notify if job hasn't started by a certain time?

    Posted Sep 30, 2014 10:29 AM
    Samah:

    Certainly, what do you need to know?


  • 6.  how to notify if job hasn't started by a certain time?

    Posted Oct 15, 2014 07:23 PM
    I was able to figure this out with the help of support. It's not the most elegant method, but I was able to read the LOG of the workflow, where it tracks that the Time Checkpoint has been activated. This included the job name, so in my notification I parse the job name out of the log message.


  • 7.  RE: how to notify if job hasn't started by a certain time?

    Posted Apr 05, 2021 04:29 PM
    Samah,

    I know this is reaching back a bit but could you share the mechanics you worked out with Broadcom support to pull the job name from the workflow LOG. Also, did the workflow have to complete before you were able to access this information?

    Thanks,

    Steve.​


  • 8.  RE: how to notify if job hasn't started by a certain time?

    Posted Apr 06, 2021 02:01 AM
    Hello Steve,

    As this thread is from long past, I am just curious about AE version you are using right now ?

    If you are already on V11 / V12

    - within the job plan --> go to task property of the task --> "Time & Dependencies" tab --> Click on the "Evaluate Checkpoint" --> Select Date & Time etc. --> for the field "Execute" select a generic SCRIPT / Notification object to alert if the task is NOT started by the defined time at the check point.   

    Inside that script / notification object use following function to retrieve the Task Name & the parent name for Alerting a task did not start by that time.  

    SYS_ACT_PARENT_NAME(ACT) 
    SYS_ACT_PARENT_NR(ACT)
    &UC_CAUSE_NAME



    ------------------------------
    Regards,
    Prosenjit
    ------------------------------