public class TestDelegate implements JavaDelegate {
@Autowired private TestObjectAutowire autoWireMeIntoNotification;
public void execute(DelegateExecution execution) throws Exception { System.out.println("autoWireMeIntoNotification:: " + autoWireMeIntoNotification);
System.out.println("autoWireMeIntoNotification.toLowerCase():: " + autoWireMeIntoNotification.toLowerCase());
}
}<bean id="testDelegate" class="za.co.mycompany.services.TestDelegate" />
<bean id="autoWireMeIntoNotification" class="za.co.itdynamics.bpm.service.TestObjectAutowire"> <property name="value" value="setting this from the xml" /></bean>public class TestObjectAutowire { private String value = null;
public String getValue() { return value; }
public void setValue(String value) { this.value = value; }
public String toLowerCase() { // TODO Auto-generated method stub return value.toLowerCase(); }}<bpmn2:serviceTask id="JER_CAPTURED_NOTIFICATION" camunda:delegateExpression="${testDelegate}" name="Confirm Journal Entry Captured Notification">
...
...
</bpmn2:serviceTask><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans
<import resource="classpath:baseSpringApplicationContext.xml" /> </beans>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param>
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
</web-app>