// post the activity
ActivityDTO activityToPost = new ActivityDTO();
activityToPost.setBaseObjectType(BaseObjectType.NOTE);
activityToPost.setVerb(ActivityVerb.POST);
activityToPost.setDestinationStream(new StreamEntityDTO(request.getEntityType(), uniqueId));
activityToPost.setBaseObjectProperties(new HashMap<String, String>(Collections.singletonMap("content",
pieces.get(0))));
TaskHandlerAction postActivityAction = postActivityActions.get(request.getEntityType());
ActivityDTO postedActivity = (ActivityDTO) executor.execute(postActivityAction, inActionContext,
new PostActivityRequest(activityToPost));