Connection connection=null;
try {
ProcessEngine processEngine=ProcessEngineManagement.getDefaultProcessEngine();
connection=processEngine.getProcessEngineConfiguration().createConnection();
connection.setAutoCommit(false);
ExternalContent externalContent=new ExternalContent();
externalContent.setConnection(connection);
externalContent.setAuthenticatedUserId("1200119390");
processEngine.setExternalContent(externalContent);
ObjectMessage objMessage = (ObjectMessage)message;
flowMessage = (FlowMessage)objMessage.getObject();
String messageId=flowMessage.getId();
String processDefinitionId=flowMessage.getTargetProcess();
EventSubscriptionType eventSubscriptionType=flowMessage.getMessageType();
String nodeId=flowMessage.getTargetNode();
String tokenId=flowMessage.getTokenId();
Map<String,Object> dataVariableMap=flowMessage.getDataVariableMap();
RuntimeService runtimeService=processEngine.getRuntimeService();
if(eventSubscriptionType==EventSubscriptionType.MessageStartEvent){
MessageStartProcessInstanceCommand messageStartProcessInstanceCommand=new MessageStartProcessInstanceCommand();
messageStartProcessInstanceCommand.setProcessDefinitionId(processDefinitionId);
messageStartProcessInstanceCommand.setNodeId(nodeId);