Map<String, org.drools.process.core.WorkDefinition> workDefinitions = new HashMap<String, org.drools.process.core.WorkDefinition>();
//Load WorkDefinitions from different sources
try {
// - Assets
WorkDefinitionsLoader loader = new AssetWorkDefinitionsLoader( repositoryAssetService,
packageUUID );
Map<String, org.drools.process.core.WorkDefinition> assetWorkDefinitions = loader.getWorkDefinitions();
for ( Map.Entry<String, org.drools.process.core.WorkDefinition> entry : assetWorkDefinitions.entrySet() ) {
if ( !workDefinitions.containsKey( entry.getKey() ) ) {
workDefinitions.put( entry.getKey(),
entry.getValue() );
}