Project

General

Profile

Actions

Task #444

open

Activiti test configuration outside core module

Added by Jan Helbich over 7 years ago. Updated about 7 years ago.

Status:
New
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Workflow
Target version:
-
Start date:
05/24/2017
Due date:
% Done:

0%

Estimated time:
Owner:

Description

Workflow tests do not run outside the core-impl module. Spring throws exception:

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: public org.activiti.engine.test.ActivitiRule eu.bcvsolutions.idm.test.api.AbstractWorkflowIntegrationTest.activitiRule; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.activiti.engine.test.ActivitiRule] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.junit.Rule()}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
        ... 37 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.activiti.engine.test.ActivitiRule] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.junit.Rule()}
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1380)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1126)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1021)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)

I've already encountered this strange behavior during #353, which we solved by including functionality into the core, which is impossible in project specific modules (what I'm solving right now).

The goal of this ticket is to enable workflow tests in other modules than core.


Related issues

Is duplicate of IdStory Identity Manager - Task #682: Refactor CustomActivityBehaviorFactory out of core-implNewVít Švanda08/31/2017

Actions
Actions

Also available in: Atom PDF