Automic Workload Automation

 View Only
  • 1.  Dependencies and Preconditions in workflow

    Posted Jun 04, 2019 08:28 AM
    Edited by Mylene Chalut Jun 04, 2019 08:56 AM

    Automic Web Interface 12.2.0

    Hi guys!!

    First of all, I want to say that I did a lot of research on the subject I cannot seem to find an easy solution for my problem.  Here is what I am trying to do...

    I created a workflow that I would like to schedule several times during the month with different parameters.  I did find a way to do this by adding variables at the workflow level, and assigning their values in the schedule:


    The problem is that, based on some conditions, I want to skip the last tasks in the workflow.
       If &MONTHLY_CONN# = CONN.SQL.BR_FRAME and  &PRELIMSUFFLAG# = N 
           skip



    So I added Preconditions in JOBS no.7 as follow:


    So far, so good...  this is working!!  So I thought I would add the same preconditions to the last 3 JOBS. This is where I got screwed!!  Because in the Dependencies tab on JOBS no.8, I don't have the option of selecting "ENDED_OK_OR_SKIPPED"!!  So the job aborted before even analyzing the preconditions...

     


    So I went back to the Preconditions that I setup in JOBS no.7, and the only options I have in the Finally section are the following...



    Now my question is:  Is there an easy way to do this?

    Thanks a lot in advance for your help :-)

    #workloadautomation #WorkflowDependencies #WorkflowPreconditions #JOBP_Preconditions #JOBP_Dependencies
    ​​​​​​


  • 2.  RE: Dependencies and Preconditions in workflow

    Posted Jun 04, 2019 08:55 AM
    Hi,
    I think you can use ANY_OK instead of ENDED_OK_OR_SKIPPED. In this case job 8 is not canceled and the pre condition will be executed.

    ------------------------------
    Thx & rgds
    Christian
    ------------------------------



  • 3.  RE: Dependencies and Preconditions in workflow

    Posted Jun 04, 2019 09:39 AM
    The ANY_OK is not working for us since it includes ENDED_TIMEOUT and ENDED_INACTIVE, among others, which are not OK for us :-(

    ------------------------------
    Programmer-analyst
    Statistics Canada
    ------------------------------



  • 4.  RE: Dependencies and Preconditions in workflow

    Posted Jun 04, 2019 09:39 AM
    The ANY_OK is not working for us since it includes ENDED_TIMEOUT and ENDED_INACTIVE, among others, which are not OK for us :-(

    ------------------------------
    Programmer-analyst
    Statistics Canada
    ------------------------------



  • 5.  RE: Dependencies and Preconditions in workflow
    Best Answer

    Posted Jun 04, 2019 11:26 AM
    Here is what I finally did...

    I created a JOBI that I included in the Pre process of the last JOBS:

    !EXECUTE ONLY IF JOBS EXECUTED IN JOBP
    :IF SYS_ACT_PARENT_NAME() NE " "
    : IF &MONTHLY_CONN#  = 'CONN.SQL.BR_FRAME'
    :    IF &PRELIMSUFFLAG# = 'N'
    !      ENDED_EMPTY / STOP NOMSG !
    :      STOP NOMSG,55,"DO NOT RUN IF WORKFLOW FOR FINAL BRFRAME"
    :    ENDIF
    : ENDIF
    :ENDIF
    ​

    End then I updated the Dependencies with the following:


    It's working !

    Thanks for your help :-)

    ------------------------------
    Programmer-analyst
    Statistics Canada
    ------------------------------