Forums

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

Replacing script with groovy class

Jamil Rahimov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2020

Hi everybody!
There were 4 groovy script in the workflow which are used for creating issues. 1 Issue for "X" Department, 1  issue for "Y" Department, 2 issues for "Z" Department .
Recently I have tried to optimize 4 groovy scripts to one groovy class.
But now I have performance problems.Please help me to fix this problem.

1 answer

1 accepted

0 votes
Answer accepted
Tuncay Senturk _Snapbytes_
Community Champion
September 3, 2020

Hi @Jamil Rahimov 

If you are using the script in a workflow post function and in the script you're creating 4 issues, the transition will take longer than usual causing frustrated users.

Have you thought to create each issue in separate threads? If you do so, you'll create issues in parallel and also they won't wait your users, while the issues are created in the background.

Try to use Groovy Threads 

Thread.start { code for create issue }

I hope it helps

Jamil Rahimov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2020

@Tuncay Senturk _Snapbytes_ 
Thanks a lot!)

Tuncay Senturk _Snapbytes_
Community Champion
September 4, 2020

You're welcome @Jamil Rahimov 

Suggest an answer

Log in or Sign up to answer