AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  working with conditions

    Posted Feb 21, 2023 05:40 PM

    New to appworx, trying to put a safety in place for two process flows.   Manual intervention is showing human error prone.

    process flow, "daily batch" (A) runs daily.

    Process flow (B) runs at the end of the month.

    While flow A is running and job X kicks off, it needs to be immediately put on hold until a certain job in flow B completes.

    Trying to figure out a way to add a condition to job (A), so that if the date is the last day of the month, it fires off on hold.

    Can someone point me to some really good documentation on using the conditions?  What I am finding so far is cryptic and extremely unintuitive.



  • 2.  RE: working with conditions

    Posted Feb 22, 2023 03:48 AM

    the online documentation is a good place to start if you've not seen it.  it's not perfect, but should be good enough to get an understanding of the principles

    https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/applications-manager/9-4-0/Development_Guide/Working_with_Conditions.html

    to put job A on hold if it's the last day of the month you could set up a condition on Job A to test the values of the #today and #last_of_month subvars and if they are the same use a condition action to put the job on hold (as shown below).

    Be aware though that using the SET HOLD action means that the job will need to manually released at the appropriate time.

    if you want job A to WAIT until a certain job completes you would need to make use of additional conditional logic to achieve that

    Also, check the two subvars to make sure they both use the same date format otherwise the comparison won't work as you expect

    hope this of some help..



    ------------------------------
    Cheers
    Pat
    ------------------------------



  • 3.  RE: working with conditions

    Posted Feb 22, 2023 01:30 PM
    Edited by Charles Huang Feb 22, 2023 01:33 PM

    Use Condition, [BEFORE][CHECK FILE] and if file does not exist, DELAY TASK for X minutes, with every time the condition is true -- so you don't need the HOLD. And then in Process Flow B, add extra steps to create/remove the flag file. eg RUN_X_FLAG.

    Or else, you can create a subvar in chain B so that chain A can have a step to check if subvar value equals to something, then wait or run.




  • 4.  RE: working with conditions

    Posted Feb 22, 2023 01:35 PM

    Alas the reply is messed up by EDIT.

    Use Condition, [BEFORE][CHECK FILE] and if file does not exist, DELAY TASK for X minutes, with every time the condition is true -- so you don't need the HOLD. And then in Process Flow B, add extra steps to create/remove the flag file. eg RUN_X_FLAG.

    Or else, you can create a subvar in chain B so that chain A can have a step to check if subvar value equals to something, then wait or run.




  • 5.  RE: working with conditions

    Posted Feb 23, 2023 11:51 AM

    Thank you for the responses Charles.

    I had been looking at that documentation actually, and it was not making a lot of sense.  The missing link was when you mentioned the sub vars.  I had stumbled across that while digging....putting two and two together, it actually made some sense, and I was able to also figure out another test I had been failing.  I will look at the other recommendations you said as well.



    ------------------------------
    Willy B.
    Oracle DBA
    ------------------------------



  • 6.  RE: working with conditions

    Posted Feb 24, 2023 04:28 PM

    I've read through your response a few times now, really trying to digest what it is you are saying to ensure I undestand.  By check_file, I'm guessing that refers to the 0.XXXX sysout file that is created?   Not sure why that does not setting well with me as a definite/finite solution if so.  But I can give that a try still.

    What I have done so far with your other recommendations, as test.

    The job to be placed on hold dependent on date:    clm_email_tst

    The trigger job to release that hold on success:  clm_email_ans

    So I have tested kicking off clm_email_tst in a hold state successfully.

    Here are the conditions for that job.

    The first one is the live test, the second is the actual month end test.  And the third is the trigger condition.

    When I execute the clm_email_ans job, it just emails me....  But the clm_email_tst never changes.

    Shouldn't that see the state of the clm_email_ans job finishing successfully, and toggle to run the task?



    ------------------------------
    Willy B.
    Oracle DBA
    ------------------------------



  • 7.  RE: working with conditions

    Posted Feb 27, 2023 04:28 AM

    if condition 1 or 2 are evaluated as true the job will be put into HOLD status and the AM engine will stop processing conditions for the job

    consider the following set of before conditions as an alternative:

    1. if today is not the last day of the month then run the job

    2. if the CLM_EMAIL_ANS has completed successfully within the last 5mins then run the job

    3.  ALWAYS TRUE delay task 2 minutes

    this set of conditions should mean that on any day that is not the last day of the month the job will just run, but on the last day of the month before running it will check to see whether the CLM_EMAIL_ANS has completed in the last 5minutes.  if not, then condition 3 will be evaluated which will stop any further evaluation of whether the job can be run for 2 minutes, after which the AM engine will again start evaluating the job conditions to see if the job can run

      



    ------------------------------
    Cheers
    Pat
    ------------------------------