if(properties.get("taskname") != null && properties.get("taskname").length() > 0) {
if(isCustomElement(properties.get("tasktype"), preProcessingData)) {
// add droolsjbpm-specific attribute "taskName"
ExtendedMetaData metadata = ExtendedMetaData.INSTANCE;
EAttributeImpl extensionAttribute = (EAttributeImpl) metadata.demandFeature(
"http://www.jboss.org/drools", "taskName", false, false);
SimpleFeatureMapEntry extensionEntry = new SimpleFeatureMapEntry(extensionAttribute,
properties.get("taskname").replaceAll("&","").replaceAll(" ", ""));
task.getAnyAttribute().add(extensionEntry);
}