Automic Workload Automation

Expand all | Collapse all

How to do the workflow

Matthias Schelp

Matthias SchelpMar 28, 2018 06:27 AM

MikhailTarasov604547

MikhailTarasov604547Mar 29, 2018 07:24 AM

Anon Anon

Anon AnonMar 30, 2018 02:45 AM

  • 1.  How to do the workflow

    Posted Mar 26, 2018 08:02 AM
    Good day!
    Automation Engine 12.0.3
    Please tell me how to do the next workflow:
    gf2csjd9z0c5.pnghttps://us.v-cdn.net/5019921/uploads/editor/k0/gf2csjd9z0c5.png" width="1285">
    I have first workflow, which starts working at 3 a.m (Workflow 1 at picture).
    And I have second workflow, it start at 4 a.m.
    The step 2  (in Workflow 2) 
    has the conditions for start:

    Step 1 finished OK    AND   ( "Workflow 1 finished OK"  OR  "already 4:45 a.m,then do not wait for the  Workflow 1")


  • 2.  How to do the workflow

    Posted Mar 27, 2018 09:17 AM
    Hi

    In theory you should use an External Dependency - but I did not get it to work.

    So I would create a check script (check if Workflow1 is finished AND the time condition).

    If you want I can create a short example for you in the evening.

    cheers Wolfgang


  • 3.  How to do the workflow

    Posted Mar 27, 2018 10:42 AM
    Hi

    In theory you should use an External Dependency - but I did not get it to work.

    So I would create a check script (check if Workflow1 is finished AND the time condition).

    If you want I can create a short example for you in the evening.

    cheers Wolfgang
    Hi. If it is not difficult, send an example.
    Thanks!


  • 4.  How to do the workflow

    Posted Mar 27, 2018 12:30 PM
    Hey Mikhail,

    You could also use the Preconditions task properties on step 2 for Check History and Check Time


  • 5.  How to do the workflow

    Posted Mar 28, 2018 03:41 AM
    Mh, from what Mikhail describes. Isn't it much simpler?

    Create Workflow1 which starts at 3 AM
    Create Workflow2 which starts at 4 AM and add Step1, Step2, ...
    Define earliest Start time 4:45 AM for Step2

    Done



  • 6.  How to do the workflow

    Posted Mar 28, 2018 03:48 AM
    For example, i have this process:

    6l53ws6qxq6v.pnghttps://us.v-cdn.net/5019921/uploads/editor/2c/6l53ws6qxq6v.png" width="769">

    Could you tell me what preconditions I should have?
    Could you show an example?


  • 7.  How to do the workflow

    Posted Mar 28, 2018 04:23 AM
      |   view attached
    Good morning,

    it was a bit tricky to work it out (hopefully I did not miss any easy cheesy obvious solution :-)  )

    First: I tried Step1 and Workflow1 as external dependency - no luck (i do not often use them, possibly my fault)
    Second: I tried the same as Michael's suggestion - no luck either, OR logic did not work properly in preconditions
    Third: Created a script solution that works in combination with POST conditions.

    Basically My JOBP.FIRST is your STEP1 - only a dummy job that does an exit 55 or not...
    JOBP.SECOND is your Main Workflow

    First object in that WF is a dummy script.
    2nd task SCRI.CHK_OBJ in my workflow is your AND condition and a check script. It checks the statistics of JOBP.FIRST and the time ..

    Parameters in SCRI.CHK_OBJ:
    :SET &OBJ_TO_CHECK# = "JOBP.FIRST"
    :SET &STARTTIME# = "145000"

    Dependent from the outcome of these checks an object variable &PROCEED# is set.

    A Postcondition of this task checks this variable and restarts the task, if its not Y (JOBP.FIRST did not ran successful AND its earlier than "145000".

    the third task is a dummy job...

    have fun :-)

    cheers, Wolfgang



    Attachment(s)



  • 8.  How to do the workflow

    Posted Mar 28, 2018 06:27 AM
    How about this.

    91zhudic7waw.pnghttps://us.v-cdn.net/5019921/uploads/editor/x9/91zhudic7waw.png" width="1464">

    Regards, Matthias



  • 9.  How to do the workflow

    Posted Mar 29, 2018 05:31 AM
    Hi all.
    Matthias, Evnt1 one must finish its work even if the time has come 1.45. But "call.mail" after 1.45  will not wait for Evnt1 and will start. Also, the "call.mail" should start before 1:45, if  Evnt1 works quickly.


    Wolfgang Brueckler, I looked at your script SCRI.CHK_OBJ, I understand the idea. 
    But I could not apply it to my process.
    Its  checked my Evnt1 and time, but did not restart.
    Is not it right?

    At first everything looks good:

    grdqhdodycsd.pnghttps://us.v-cdn.net/5019921/uploads/editor/mv/grdqhdodycsd.png" width="922">
    Evnt1 then works, but the script is already in status ENDED_OK


    heiyq5bocuqx.pnghttps://us.v-cdn.net/5019921/uploads/editor/qx/heiyq5bocuqx.png" width="934">



    81ovgp5nccwc.pnghttps://us.v-cdn.net/5019921/uploads/editor/pu/81ovgp5nccwc.png" width="937">
    om1l29sop3k7.pnghttps://us.v-cdn.net/5019921/uploads/editor/5c/om1l29sop3k7.png" width="934">
    Report SCRI :
    2018-03-29 12:18:45 - U00020206 Variable '&PROCEED#' was stored with value ''. 2018-03-29 12:18:45 - U00020408 EVNT.1 state=  0000 2018-03-29 12:18:45 - U00020408 Now its 121845 2018-03-29 12:18:45 - U00020408 Start Time 130000 far away !! 2018-03-29 12:18:45 - U00020206 Variable '&PROCEED#' was stored with value 'N'.


  • 10.  How to do the workflow

    Posted Mar 29, 2018 05:57 AM
    Hi

    the script will always end in ENDED_OK - its just checking the state of an object.

    Here you can see its not able to get the state of the object - here you should change the script/object/.....
    2018-03-29 12:18:45 - U00020408 EVNT.1 state=  0000
    Pls make sure generate@runtime is set in the checkscript!

    is this by intention that the scrit has no predecessor?

    cheers Wolfgang


  • 11.  How to do the workflow



  • 12.  How to do the workflow

    Posted Mar 29, 2018 08:40 AM
    I don't know why it not able to get the state of the object  ...
    Why does the script-check need a predecessor?
    If Script-check has the status ENDED_OK each time, how to force the next step wait for the script verification conditions to be performed (step 1 will work or time will be HHMMSS)

    But in your WF it has next report, how script check JOBP.FIRST ?
    2018-03-29 15:22:25 - U00020206 Variable '&PROCEED#' was stored with value ''. 2018-03-29 15:22:25 - U00020408 JOBP.FIRST state=  1900 2018-03-29 15:22:25 - U00020408 The task JOBP.FIRST has successfully ended, proceeding...


  • 13.  How to do the workflow

    Posted Mar 29, 2018 09:13 AM
    Hi
    I don't know why it not able to get the state of the object  ...
    => That depends on the settings of the EVNT object - this will not necessarily end with ENDED_OK after executing the !Script if its not set in it properties.
    To use an EVNT I think you need to adapt the status code the SCRI should check. If you have bad luck you must catch the Run ID of the !Script execution as well.

    The script itself does not need a predecessor but without you would ignore the status of your Object STEP1

    cheers, Wolfgang


  • 14.  How to do the workflow
    Best Answer

    Posted Mar 29, 2018 10:40 AM
    Hm,

    okay one more try with external dependency. At least it did work for me ...

    z7v98sa7ucty.pnghttps://us.v-cdn.net/5019921/uploads/editor/5x/z7v98sa7ucty.png" width="1064">


  • 15.  How to do the workflow

    Posted Mar 30, 2018 02:45 AM
    great that this works!

    cheers, WOlfgang


  • 16.  How to do the workflow

    Posted Apr 05, 2018 08:11 AM

    Hm,

    okay one more try with external dependency. At least it did work for me ...

    z7v98sa7ucty.pnghttps://us.v-cdn.net/5019921/uploads/editor/5x/z7v98sa7ucty.png" width="1064">
    It works =)

    Thank You all very much