Forums

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

I have a problem by aktivating my own plugin

MohamedNashaat May 11, 2020

The following snippet I have wrote in order to get possible information about PostFunctions and Conditions that exist in Workflow

@Named("MyJiraWorkFlow")
public class MyJiraWorkFlow extends AbstractWorkflowEvent {

private MyJiraWorkFlow(@ComponentImport @Nonnull JiraWorkflow workflow) {
super(workflow);
workoutPostFunctions();
}

@Override
public JiraWorkflow getWorkflow() {
workoutPostFunctions();
return super.getWorkflow();

}


public void workoutPostFunctions() {
Map<ActionDescriptor, Collection<FunctionDescriptor>> functionDescriptors = new HashMap<>();
Collection<ActionDescriptor> allActions = getWorkflow().getAllActions();
allActions.forEach(e -> functionDescriptors.put(e, getWorkflow().getPostFunctionsForTransition(e)));


functionDescriptors
.forEach((e, x) -> {
System.out.println("----------------------------------Begin--------------------------------------");
System.out.println("Action Name: " + e.getName());
System.out.println("Conditional Results: " + e.getConditionalResults().size());
System.out.println("Function Descriptor: " + x.iterator().next().asXML());
System.out.println("-----------------------------------End---------------------------------------");
});
}
}

The problem is, once I try to activate my plugin the following error shows up:

 QuickReload - Plugin Installer ERROR [c.a.p.osgi.factory.OsgiPlugin] Plugin 'my.plugin' never resolved service '&jiraWorkflow' with filter '(&(objectClass=com.atlassian.jira.workflow.JiraWorkflow)(objectClass=com.atlassian.jira.workflow.JiraWorkflow))'

 

Looking forward to a suggestion or a solution, thanks in advance 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events