*
* @param event
*/
@Override
public void onInteractionEvent(final InteractionEvent event) {
QName id = event.getId();
QName source = (QName)event.getSource();
final Set<Procedure> collection = procedures.get(id);
Procedure execution = null;
if(collection!=null)
{
for(Procedure consumer : collection) {
// TODO: This isn't optimal (creation of new resource with every comparison)
Resource<ResourceType> resource = new Resource<ResourceType>(id, ResourceType.Interaction);
resource.setSource(source);
boolean justified = consumer.getJustification() == null
|| source.equals(consumer.getJustification());
if(consumer.doesConsume(resource) && justified)
{
execution = consumer;
break;