Package org.flowable.engine.test.mock
Class MockResolverFactory
java.lang.Object
org.flowable.engine.test.mock.MockResolverFactory
- All Implemented Interfaces:
ResolverFactory
This is a bridge resolver, making available any objects registered through
In order to use it, you need to declare it as ResolverFactory, for example by using flowable.cfg.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration"
class="org.flowable.engine.impl.cfg. StandaloneInMemProcessEngineConfiguration">
<property name="expressionManager">
<bean class="org.flowable.engine.test.mock.MockExpressionManager" />
</property>
<property name="resolverFactories">
<list>
<bean class="org.flowable.common.engine.impl.scripting.VariableScopeResolverFactory " />
<bean class="org.flowable.common.engine.impl.scripting.BeansResolverFactory" />
<bean class="com.deenero.activiti.MockResolverFactory" />
</list>
</property>
</bean>
</beans>
or by any other means of creating configuration.
Mocks.register(java.lang.String, java.lang.Object)
inside scripts supported by process execution. In order to use it, you need to declare it as ResolverFactory, for example by using flowable.cfg.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration"
class="org.flowable.engine.impl.cfg. StandaloneInMemProcessEngineConfiguration">
<property name="expressionManager">
<bean class="org.flowable.engine.test.mock.MockExpressionManager" />
</property>
<property name="resolverFactories">
<list>
<bean class="org.flowable.common.engine.impl.scripting.VariableScopeResolverFactory " />
<bean class="org.flowable.common.engine.impl.scripting.BeansResolverFactory" />
<bean class="com.deenero.activiti.MockResolverFactory" />
</list>
</property>
</bean>
</beans>
or by any other means of creating configuration.
- Author:
- Emil Genov (http://www.emil-genov.info/)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateResolver
(AbstractEngineConfiguration engineConfiguration, VariableContainer scopeContainer, VariableContainer inputVariableContainer) Create aResolver
instance.
-
Constructor Details
-
MockResolverFactory
public MockResolverFactory()
-
-
Method Details
-
createResolver
public Resolver createResolver(AbstractEngineConfiguration engineConfiguration, VariableContainer scopeContainer, VariableContainer inputVariableContainer) Description copied from interface:ResolverFactory
Create aResolver
instance.- Specified by:
createResolver
in interfaceResolverFactory
- Parameters:
engineConfiguration
- the engine configurationscopeContainer
- the scope variable container in which the script is executedinputVariableContainer
- the variable container that should be used to resolve variables- Returns:
- the created
Resolver
instance
-