private Either<Collection<ActionDescriptor>, ErrorCollection> getActionsByName(String transitionName, JiraWorkflow draftWorkflow) { //Retrieves all actions that match the name and return them. Collection<ActionDescriptor> actions = draftWorkflow.getActionsByName(transitionName); if (actions.isEmpty()) { I18nHelper i18n = jiraAuthenticationContext.getI18nHelper(); ErrorCollection errorCollection = new SimpleErrorCollection(); errorCollection.addErrorMessage(i18n.getText("admin.workflowtransitions.service.error.no.action", transitionName)); return right(errorCollection); } return left(actions); }