Automic Workload Automation

Expand all | Collapse all

ONE Automation- Need a function to get the status of the workflow from activity window

  • 1.  ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 03:49 AM

    Can you please provide me any details top get the status of workflow from activity window and not through statistical records of a workflow in UC4.



  • 2.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Broadcom Employee
    Posted Aug 07, 2018 04:48 AM

    Hi,

     

    Can you please provide me any details top get the status of workflow from activity window and not through statistical records of a workflow in UC4.

    The status of an active or not yet deactivated workflow is provided in the activity window (Java UI) and Process Monitoring perspective (AWI). Just look for the column:

     

    If this is not what you're searching for please provide some details.

     

    regards,

    Peter



  • 3.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 05:26 AM

    You're probably looking for GET_UC_OBJECT_STATUS().

     

    It's a perculiar function that goes hunting for statistics data if no object is active, but if the object is still active (i.e. in activity window), it will return the object status for the active object. In your case, it's probably most useful to feed the RunID of the object in question to it.

     

    Hth.



  • 4.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 05:48 AM

     GET_UC_OBJECT_STATUS() through this function I can get only the statistical data of a job and a workflow.

    In case if any job in a workflow is blocked and then the workflow statistics shows with green question mark which indicates it is active but in activity window it will be in "workflow is blocked" status so I need that status from activity window of a workflow.

    Please let me know if you have any questions?

     



  • 5.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:07 AM
    GET_UC_OBJECT_STATUS() through this function I can get only the statistical data of a job and a workflow.

     

    Wrong. As I already said, it does return data on active objects if there are any objects matching the criteria, otherwise it returns statitics data.

     

    I tested this.

     

    A workflow that blocks:

     

     

    ... and shows in the statistics with a green "active" mark, as you said:

     

     

    ... and shows as "workflow is blocked" in the activity window:

     

     

    Then I run this script against it:

     

     

    gives this output:

     

     

    ... and "1560" is the Automic code for "workflow is blocked", which is the status from the activity window.

     

     

    Hth,



  • 6.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:29 AM

    Yes, Even I have used it is the same way but for me it is retrieving the 1550 as status code after passing the RunID. 

     

    This is my workflow in which first job blocked.

    Workflow status in statistics..

    Now same status activity window.

    In the below code $START# is passing the RunID of the workflow but it is retrieving only active status which is 1550.

    Output:

     

    Please explain if there is any error I am doing with this?



  • 7.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:34 AM

    This is indeed strange. You do have the correct RunID, your script looks right to me, yet it says 1550. I don't know on the fly why that is.

     

    What version of Automic are you on?



  • 8.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:45 AM

    we are using automic-11.2 version.



  • 9.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:49 AM

    Hm, in that case, and unless someone else chips in with something we may have overlooked, you might want to file a support ticket with CA. Make sure to include the XML exports of your workflow and script, preferably broken down to a test case that is as bare-bones as possible.

     

    (edit: but before that, please check what vicja02 suspected below)

     

    Sorry I can't help you further with this.

     

    Best,

    Carsten



  • 10.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:50 AM

    I would say, the crucial question is: at which point do you invoke the GET_UC_OBJECT_STATUS.

     

    For me it looks like that in Ramya's test, he invokes the command in the "JOBS.FTPAGENT.....", which means at that time the script of the Job is still processed and the Workflow is of course in the status "active". The Workflow status change to blocked happens only after the "JOBS.FTPAGENT..." is finshed.

     

    Regards

    Jan



  • 11.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 08:52 AM

    Good catch! Might that be the explaination?



  • 12.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 10:00 AM

    Hi,  It is actually the last line of the code where I am getting the status of the workflow which is the second time calling the GET_UC_OBJECT_STATUS() where it retrieves me 1550 and the first GET_UC_OBJECT_STATUS() retrieves the blocked job status as Job Abended.



  • 13.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 07, 2018 10:19 AM

    HI Ramya,

     

    it makes no difference if it is the first or the 2nd call of it, as long as your script part of the job is not finished, the Workflow stays in the active status and changes to blocked only after your last GET_UC_OBJECT_STATUS command and the Job is finished.

     

    Regards

    Jan



  • 14.  Re: ONE Automation- Need a function to get the status of the workflow from activity window

    Posted Aug 09, 2018 08:20 AM

    Hi Ramya,

    Another possibility is to query the Automic tables through SQL.

    Everything in the activity window can be found in the EH table.

     

    If you never queried the Automic SQL tables before, i recomment reding Philipp Elmers's Blog. He has a lot of information on what and how to query for it.

     

    Best regards,

    Thierry