Automate

 View Only
Expand all | Collapse all

Link/Chain Transaction Scripts in Studio V12.1 - How to prevent execution of remaining Scripts in the Chain if One script Fails?

  • 1.  Link/Chain Transaction Scripts in Studio V12.1 - How to prevent execution of remaining Scripts in the Chain if One script Fails?

    Posted 06-28-2021 17:39
    Hello - this is my first attempt to chain scripts in Studio Connect V12.1 on New Material Set up.  How can I prevent the execution of remaining scripts in the Chain if One of the scripts Fails. 
    To be more specific, here it is the desired linking: 

    Chain Chain Name Script Names Comments
    Chain 1 MDT CHAIN1  MDT STP1 MM03 NEWMAT BASIC12 DOWNLOAD V2.Txr
    Chain 1 MDT CHAIN1  MDT STP2 MM01_SALESORG1 TO COSTING2 DISTCH10 VAL PLAIN V2ch.Txr If an error occurs here (because the Ref Mat is not set up properly), how do I stop running remainign scripts in the chain?  
    Chain 1 MDT CHAIN1  MDT STP3 MM01_SALESORG1 TO SALESTXT DISTCH20 V2ch.Txr
    Chain 1 MDT CHAIN1  MDT STP4 MM01_ACCTG 12 VALTYPE EXT V2ch.Txr
    Chain 1 MDT CHAIN1  MDT STP4A MM01_ACCTG 12 VALTYPE INT V2ch.Txr
    Chain 1 MDT CHAIN1  MDT STP5 MM02 DOWNLOAD NEW MAT V2ch.Txr
    MDT STP6 MM02 UPDATE NEW MAT V2ch.Txr User makes proper updates to the same sheet as Downloaded data 
    Chain 2 MDT CHAIN2 MDT STP7 MMSC EXTEND STORAGE LOC V2ch.Txr
    Chain 2 MDT CHAIN2 MDT STP8 SCWM CREATE WH DATA for EWM Plant V2ch.Txr
    Chain 2 MDT CHAIN2 MDT STP9 MM02 ACTIVATE MAT DISTCH10_20 V2ch.Txr
     

    Thank you!

    ------------------------------
    Vicky Muresan | Master Data
    Synergy55 | 847-687-7413
    ------------------------------


  • 2.  RE: Link/Chain Transaction Scripts in Studio V12.1 - How to prevent execution of remaining Scripts in the Chain if One script Fails?

    Posted 06-29-2021 09:11
    Hi Vicky -

    Essentially you'd need to use a combination of excel formatting and an IF statement around the entire script that you would like run / not run. Whatever is the indicator of "success" for the leading script, such as a log column having a certain statement, would be used to drive the IF statement. If you are using separate tabs in your Excel, you would want to make sure that the tab that the affected script is pointing to includes the log column from the leading script, you would use formulas to point to the leading script's tab. That log column (or whatever column would be used for the IF condition) would then be used as the condition for the IF statement that would be placed on the entire affected script. This means that in the Expert view of the mapper, the IF condition would start from the first row after the run log fields, and go all the way to the very end of the script. So this tells the script to run the whole thing or to not run the whole thing based on the condition. 

    Thank you!

    ------------------------------
    Jennifer Hwang | SE
    Winshuttle North America
    ------------------------------



  • 3.  RE: Link/Chain Transaction Scripts in Studio V12.1 - How to prevent execution of remaining Scripts in the Chain if One script Fails?

    Posted 06-29-2021 10:15

    Thank you Jennifer for the quick response and all the details. Indeed it is a great idea!

     

     

    Vicky Muresan

    Project Manager
    Composites One LLC | Synergy55 LLC
    955-10 National Parkway, Schaumburg, IL 60173-5161
    P: 847.687.7413 |

    vicky.muresan@synergy55.com

     

    This message and any attachments are intended only for the addressee. The information contained in this message may be confidential and constitute proprietary or nonpublic information. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by email.