2 Replies Latest reply on Mar 9, 2017 5:37 AM by [email protected]

    Run Workflow only in Production

    johan.henningsson@tetrapak.com Apprentice

      I'm trying to setup a scheduled workflow which will send a notification to the owner team of all published knowledge articles which has passed expiration date.

       

      Workflow works, saved search works, quick action works. But I want the workflow to be restricted from running in environment except production. In staging and uat the workflow shouldn't kick in. Or the workflow should at least not send the email.

       

      The IF block does not contain system variables for me to use. The Scheduled Job does not contain any variables for me to use. So far the only way would be to put in an expression in the TO field of the email checking the system values and send the email only if A = B.

       

      Anyone with a better suggestion?

       

      Best Regards

      Johan Henningsson

        • 1. Re: Run Workflow only in Production
          AlasdairRobertson ITSMMVPGroup

          When you refresh from production any running workflows are ended.  There are a couple of options, disable the workflow service on the STG/UAT server or you can create a STG/UAT Prep package which would disable to schedules or workflows.  I have a package which I run on my test environments to configure all the test email settings once it has been refreshed.

           

          Another idea to test is if you have a DNS address for HEAT correctly configured you may be able to use the $(ServerURL()) function and test to see if your on the Servicedesk-STG.xxx.com or Servicedesk.xxx.com etc.

          • 2. Re: Run Workflow only in Production
            johan.henningsson@tetrapak.com Apprentice

            I was able to sovle it by using an existing global constant where we store the tenant name, STG, UAT and PRD. In the scheduled workflow I update a new field value in "ScheduleEntry" with the value from the global constant. I can then use the field value in an IF-block and send only if exit is true.

             

            Best Regards

            Johan Henningsson