Add support for conditional execution of workflow post functions

XMLWordPrintable

      This topic was brought up on RFC-146.

      Providing an optional conditional trigger to Forge workflow post functions would give applications a way control whether a post function will trigger. This could provide efficiency gains for apps and reduce their need to perform complex processing or calls out to other services in cases where they do not need to be run.

      For example adding a `triggerCondition.expression` could be added in the module definition so the function only runs the function if the the 'some-key' properties is set in issue properties.

      e.g.

       

      modules:
        jira:workflowPostFunction:
          - key: my-forge-workflow-post-function
            name: Jira workflow post function example
            function: my-postfunction
            projectTypes: ['company-managed', 'team-managed']
            triggerCondition: 
              expression: "issue.properties['some-key'] != null"
            
          ...
          ...
        function:
        - key: my-postfunction
          handler: index.postfunction
      

       

              Assignee:
              Rahul Yadav
              Reporter:
              Marcel Caroly
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: