Forums

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

Script Runner

Radha Khullar
Contributor
September 1, 2019

Hi,

I have written a custom Plugin and I am using one of its Component interface class in a groovy script outside of the plugin by using below annotation:

import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin

@WithPlugin(<App-Key>)

@PluginModule

It ran fine inside Script Runner but when I set up the groovy as a Service, it failed and I read in some post on Atlassian forum that in such situation disable and re-enable Script runner it should work fine. 

I did the same and indeed the groovy as service started functioning.

So now everytime I make any change in the Plugin code, I have to disable/re-enable Script runner.

In this context I wanted to check is this approach correct and expected that is Script runner must be disabled and enabled for a custom plugin class to be used externally or I am missing something?

Can you please advise.

Thanks.

 

Regards

Radha 

 

1 answer

0 votes
Ilya Turov
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 2, 2019

I guess it's needed to trigger a recompiling of both classes. Did you try "making some irrelevant change like adding a space to a comment" to your service script as suggested in Script Roots section? 

The situation is not exactly the same, but I feel like the solution might be the same. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events