IT Process Automation

  • 1.  Email notifications for failed schedules

    Posted Jul 29, 2013 10:44 AM
      |   view attached
    Hello,

    We're required to create a daily alert/email notification containing all schedules that failed on a given day so that they can be later further investigated for the cause of failure. Since PAM doesn't offer generic support for this task (i.e. email alerts for failed schedules), I think we would be required to create a custom solution that queries the ITPAM database for all failed schedules for the day and then email them.

    I tried to look directly at the SQL tables to figure out how I would get this info but can't figure it out. Has anyone done something similar? Or is anyone able to point me in the right direction?

    Basically the query would be:

    Select all process that were started by a Schedule Object,
    where status=failed and date=today.

    I have attached a screenshot of exactly what kind of info/report I'm trying to generate.


  • 2.  RE: Email notifications for failed schedules

    Posted Aug 15, 2013 06:00 PM
    Hello Community:

    Any thoughts for jdafoe?

    Thanks,
    Mary


  • 3.  RE: Email notifications for failed schedules

    Posted Aug 19, 2013 12:11 PM
    Hi James,

    Are these tasks failing because they could not be started or because the Process hit an abnormal (red) stop?

    Thanks,
    Tom


  • 4.  RE: Email notifications for failed schedules

    Posted Aug 22, 2013 10:48 AM
    Hi Tom,

    It could be eaither case. That's why I don't want to rely on sending an email in the process. Additionally, some of the schedules are not even processes (operator calls). If there was a way to query the database for all failed schedules on a given day, I would be able to get a notifcation.

    Thanks,

    James


  • 5.  RE: Email notifications for failed schedules
    Best Answer

    Posted Aug 22, 2013 05:18 PM
    As always, direct access to the database schema is not encouraged, since the schema is NOT an API and is subject to change at developments whim, and SE will therefore not officially support this, however given those caveats, running the following query against the PAM run time database

    SELECT d.ROID, d.Instance AS 'Process Instance', d.RunState AS 'Run State' from c2oruntimeobjects d where
    d.callerType='AGENDA' and
    d.DiscriminatorType='WorkFlow' and
    d.RunState IN ('Failed’, ‘Blocked’)

    will list all processes that were directly started from a Schedule (formerly Agenda), and exited through an AbnormalStop operator, or are blocked.


  • 6.  RE: Email notifications for failed schedules

    Posted Aug 27, 2013 01:56 PM
    Thank you! Exactly what I was looking for.

    I understand this isn't a supported API but it's the only method I can use since the tool doesn't have a notification feature.