4 Replies Latest reply on Jan 10, 2017 6:50 AM by wardclerk

    Run DSM package on failure of other package

    wardclerk Rookie

      Has anyone found a working method to accomplish.....?

      If package A fails execution, then automatically run package B on the client machine

       

      This would save me a lot of on-going maintenance.

        • 1. Re: Run DSM package on failure of other package
          markuszierer Apprentice

          Hi Tyler,

           

          unfortunately your question is not simple to answer. This is because there are different ways to handle such topics. Basically the question is, what exactly do you need / want? To be more precise, should the error handling happen inside of the executed package or should it be handled outside? Both Options have it's own pro's & con's.

           

          A typical way of an package internal handling would be to use commands which are creating return values. Those values are written to a variable which needs to be evaluated after the execution of the package (e.g. RunAsEX, ExecuteEX). Using an IF Condition you can precisely verify which kind of error happened and what to do. this could be to run a specific application or script. You can even run a separate script (RuneScript command).

           

          For an external handling, you have to create a Job. Jobs are installations which are triggered by special events. You can specify a job condition which runs the script in case of an failed package installation. Be aware that job scripts can only be executed in computer context.

          • 2. Re: Run DSM package on failure of other package
            wardclerk Rookie

            Thanks Markus,

            I know about the job policy option, but want a package execution specific to only one package failure, not all of them.

             

            Specifically, if I have a command MSIApplyPatch that fails, then the entire package aborts.  How can I get DSM to continue execution of subsequent commands after an MSI or MSP install fails (so I can do my error handling)?

             

            Thanks

            • 3. Re: Run DSM package on failure of other package
              _Mel_ Master

              you can flag a script command as "Continue script despite error". a command that is flagged this way will not abort the script if an error occurs so you can handle the error yourself

              2 of 2 people found this helpful
              • 4. Re: Run DSM package on failure of other package
                wardclerk Rookie

                Perfect.  I have occasionally seen this flag over the years, but never used it - So didn't remember about it.  Thanks so much!