Thanks for the feedback @Chris_at_DigitalRose . I was about to close the discussion, so I’ll hold it open for a few more days.
Skipping processing
You’re right. An expression that skips upfront processing would be more efficient, especially for apps that want to avoid being invoked unnecessarily. We’ve received mixed feedback on whether apps would adopt this for efficiency alone though, since many already use conditional logic for the same purpose.
We’re also undecided whether this should apply to every post-function, whether the conditional expression for app rules should be admin-controlled, app-controlled for app rules, or some combination. We planned to do the initial launch without app support, then consider how much interest there is in this feature from apps before building out broader app features or extension points. Hence this RFC.
Testing expressions via curl
We have the analyse Jira expressions API. Would that be enough for testing, or do you we something more?
Expression failures should not silently skip processing
We’re discussing this in team. We believe a runtime error in an expression should not fail and block the whole transition; it should skip the function. We welcome feedback.
One idea from @edalgliesh, if admins don’t want to skip failures, we could add a pragma or operator in the expression so authors can specify whether runtime failures should error or be skipped, or even enable debugging.
For example, add a control statement in the language to indicate failure handling.
(issue.assignee == 1234-543676-43576) |~ throw
onError:FAIL (issue.assignee == 1234-543676-43576)
onError:true (issue.assignee == 1234-543676-43576)
debug:true (issue.assignee == 1234-543676-43576)
But that would require some more discussion.
Feedback on runtime failures
We agree some form of failure feedback is needed, though it may not be in the initial release. Options include tracking recent errors per rule and showing them somewhere, or a debug mode that adds a comment with details.
Transition-time data
You should have access to everything at transition time. I believe properties can be accessed at transition time.
Some question for you
How would you configure the conditions for your apps rules?
- Would you need new extension or configuration points in the app definition or Forge, or would you set them through the workflow APIs?
- Would you expect admins to be able to edit or tweak the configuration with other conditions?