code: public void assignInstance(XEvent event, String instance) {
  		if (instance != null && instance.trim().length() > 0) {
  			XAttributeLiteral attr = (XAttributeLiteral) ATTR_INSTANCE.clone();
  			attr.setValue(instance);
  			event.getAttributes().put(KEY_INSTANCE, attr);
  		}
  	}
docs: Assigns any event its activity instance identifier, as defined by this
  extension's instance attribute.
  
  @param event
  Event to assign activity instance identifier to.
  @param name
  The activity instance identifier to be assigned.