02-28-2011 08:04 AM
<serviceTask id="javaService" name="Java service invocation" activiti:class="org.activiti.examples.bpmn.servicetask.CreateObject">
<activiti:field name="objectType" stringValue="dummy"/>
<activiti:field name="properties">
<activiti:map>
<activiti:entry key="key0"><activiti:string>Hello World</activiti:string></activiti:entry>
<activiti:entry key="key1"><activiti:expression>Hello ${gender == 'male' ? 'Mr.' : 'Mrs.'} ${name}</activiti:expression></activiti:entry>
</activiti:map>
</activiti:field>
</serviceTask>
public class CreateObject implements JavaDelegate {
…
private Expression objectType;
private Expression properties;
public void execute(DelegateExecution execution) {
String type = (String) objectType.getValue(execution);
Map props = (Map)properties.getValue(execution);
myRepository.addNode(type, props);
}
}
…
03-01-2011 03:38 AM
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.