Automic Workload Automation

 View Only
Expand all | Collapse all

How to retrieve the name of the external dependency in a job plan?

  • 1.  How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 11:30 AM
    We have instances where we set up Maximum Run Time settings and send alerts once the MRT has reached.
    If it just an object that is running long, we send out an alert with the object name by retrieving the name using the UC4 Script function (SYS_ACT_PARENT_NAME).
    There are cases where we set up MRT for external dependencies that are running long.
    Is there a way to retrieve the name of the external dependency? so that the alert can be generated with that name.


  • 2.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 11:59 AM
    Seems to me it would be better to just add an MRT rule onto that object that is your external dependency.

    In our case, we developed a generic MRT alert object that after sending the initial alert, launches another object that will run 15 minutes later to audit the state of the long running object and either send a "object has completed" alert or "object is still active" alert.   I can probably share it if you are interested.


  • 3.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 12:20 PM
    The MRT rule is already there onto the object that is the external dependency (Object B).
    So we are alerted when that job (Object B) is running long. That is a different application object, so that application would be notified when that object runs long.

    Object A belongs to another application and we would like to have a mechanism where we want to alert when object A is actually waiting on external dependency (object B). 
    So the alert should basically say "Object A is running long because it is waiting on the external dependency Object B to be completed" 
    How to achieve that? Any ideas?


  • 4.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 12:36 PM
    It would be great if the MRT alert could automatically diagnose WHY an object is still active, but difficult to do.    I guess in an isolated use-case like yours, one could write a process script into the MRT alert object that would check the current state of the external dependency object to see if it has completed or not, and modify the alert text accordingly?


  • 5.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 12:48 PM
    yes, that is the intention, but when writing a script we are not able to figure out how to get the name of the external dependency. Once we know that then we can determine its status. But the problem is how to get the name of the external dependency during the run time of the job plan?


  • 6.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 01:06 PM
    I would write a custom alert object for this single use-case, and hard-code the name of the external dependency.


  • 7.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 01:57 PM
    Thanks for all your prompt responses. unfortunately we have many such cases, it is not a single use-case.


  • 8.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 02:37 PM
    I have no idea how to query the UC4 database to find an external pred that is in a wait-state for a given workflow.  I think that is what you will need. ​


  • 9.  RE: How to retrieve the name of the external dependency in a job plan?
    Best Answer

    Posted Jun 26, 2019 02:52 PM
    Hey, I discovered that this query will locate all external predecessors for a given workflow!

    select *select *from jppwhere jpp_otype = '<XTRNL>'and jpp_oh_idnr =    (select oh_idnr  from oh where oh_client = 411 and   oh_name = 'NameOfWorkflow')


  • 10.  RE: How to retrieve the name of the external dependency in a job plan?

    Posted Jun 26, 2019 02:55 PM
    Thank you I will try it out.