Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

This article provides the code snippet that forces the user to add an internal comment on the transition screen while executing a transition.

\uD83D\uDCD8 Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

  3. Select the Validators tab and click Add validator.

  4. Add the “Scripted (Groovy) Validator (JMWE app)” validator

  5. Add one of the below Groovy scripts based on your use case:

    Use case 1: The comment is mandatory on the transition screen, and it has to be internal:

    !!transientVars.comment && !(transientVars.commentProperty[0].contains("value: {internal: \"false\"}"))


    Use case 2: The comment is not mandatory on the transition, but if entered then it has to be internal:

    !transientVars.comment || !(transientVars.commentProperty[0].contains("value: {internal: \"false\"}"))

  • No labels