public void executeEventByWorkitem(String mainInstanceId, String eventName, String triggerActivityTracingTag, ResultPayload resultPayload) throws RemoteException{
try{
ProcessInstance mainProcessInstance = getInstance(mainInstanceId);
//send message first
ProcessDefinition mainProcessDefinition = mainProcessInstance.getProcessDefinition();
EventMessagePayload eventMessagePayload = new EventMessagePayload();
eventMessagePayload.setEventName(eventName);
eventMessagePayload.setTriggerTracingTag(triggerActivityTracingTag);
mainProcessDefinition.fireMessage("event", mainProcessInstance, eventMessagePayload);
//get the initiated sub process instance
EventHandler[] ehs = getEventHandlersInAction(mainInstanceId);
EventHandler theEventHandler = null;
for(int i=0; i<ehs.length; i++){