Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner postfunction silent fail

I'm looking to migrate from JSS Pro to scriptrunner and recreating our scripts functionality.

In jython, when something failed, and for example exception was raised in workflow transition post function the workflow failed to transition and we got this screen or similar. Which is desirable behaviorScreenshot_25.png

 

Scriptrunner post functions however, just silently fail, allow the transition to happen and just leaves log in atlassian-jira.log

2021-12-16 11:28:41,581+0000 http-nio-8080-exec-15 ERROR user 688x6423x1 1pnrhxj 172.18.0.1 /secure/WorkflowUIDispatcher.jspa [c.o.s.jira.workflow.AbstractScriptWorkflowFunction] Workflow script has failed on issue XXX-2485 for user 'user'. View here: http://localhost:8081/secure/admin/workflows/ViewWorkflowTransition.jspa?workflowMode=live&workflowName=XXX%3A+Defect%2FTask&descriptorTab=postfunctions&workflowTransition=181&highlight=1

com.opensymphony.workflow.WorkflowException: testFailure

at testClass.run(testClass.groovy:20)

And I don't like this behavior, I would like to recreate the one provided by JSS, is there some special type of exception I have to throw?

1 answer

I have found that I would need to basically try to catch any exceptions and do

assert false

 but it's still not something I'm entirely happy with. Is there a better way?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you