{
log.debug("Entering createActivity data with userId " + userId.getUserId(token) + ", appId " + appId + ", "
+ fields.size() + ", AcivityId " + activity.getId() + ", token appId " + token.getAppId());
try
{
Principal currentUserPrincipal = openSocialPrincipalDao.execute(userId.getUserId(token));
// Create the actor.
StreamEntityDTO actorEntity = new StreamEntityDTO();
actorEntity.setUniqueIdentifier(currentUserPrincipal.getOpenSocialId());
actorEntity.setType(EntityType.PERSON);
// Create the destination stream.
StreamEntityDTO destStream = new StreamEntityDTO();
destStream.setUniqueIdentifier(currentUserPrincipal.getAccountId());
destStream.setType(EntityType.PERSON);
// Create the activitydto object.
ActivityDTO currentActivity = new ActivityDTO();
currentActivity.setActor(actorEntity);