Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner postfunction silent fail

Jakub Cieplinski
Contributor
December 16, 2021

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

0 votes
Jakub Cieplinski
Contributor
December 16, 2021 edited

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
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events