04-19-2012 04:54 AM
<bean id="mailBean" class="com.utils.MailBean" >
<property name="mailService">
<ref bean="mailService"/>
</property>
</bean>04-19-2012 07:58 AM
04-18-2014 03:51 AM
<util:map id="activitiBeanRegistry" map-class="java.util.HashMap">
<entry key="services" value-ref="ServiceRegistry" />
<entry key="SetWorkflowUsers" value-ref="SetWorkflowUsers" />
// In my case SetWorkflowUsers extends ScriptExecutionListener. Also SetWorkflowUsers is my bean id.
</util:map>
<bean id="SetWorkflowUsers" class="com.demo.workflow.SetWorkflowUsers">
<property name="serviceRegistry">
<ref bean="ServiceRegistry" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="searchService">
<ref bean="SearchService"/>
</property>
</bean>
and put below entry/method in SetWorkflowUsers.java
/**
*
* get SetworkflowUsers 's object from Context
*
* */
protected SetWorkflowUsers getSetWorkflowUsers()
{
ProcessEngineConfigurationImpl config = Context.getProcessEngineConfiguration();
if (config != null)
{
// Fetch the registry that is injected in the activiti spring-configuration
SetWorkflowUsers setWorkflowUsers = (SetWorkflowUsers) config.getBeans().get("SetWorkflowUsers");
if (setWorkflowUsers == null)
{
throw new RuntimeException(
"setWorkflowUsers not present in ProcessEngineConfiguration beans, expected setWorkflowUsers with key SetWorkflowUsers");
}
return setWorkflowUsers;
}
throw new IllegalStateException("No ProcessEngineCOnfiguration found in active context");
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.