@Override
protected Element invokeInternal(Element requestElement) throws Exception {
Element commonElement = requestElement.getChild("common", WORKFLOW_NAMESPACE);
Element activityCompleteElement = requestElement.getChild("activityComplete", WORKFLOW_NAMESPACE);
ActivityCompleteMsg acMsg = new ActivityCompleteMsg();
acMsg.setExternalKey(commonElement.getChildText("externalKey", WORKFLOW_NAMESPACE));
acMsg.setProcessVariablesByElementList(commonElement.getChildren("processVariable", WORKFLOW_NAMESPACE));
acMsg.setRolesByElementList(commonElement.getChildren("role", WORKFLOW_NAMESPACE));
acMsg.setEndpoint(activityCompleteElement.getChildText("endpoint", WORKFLOW_NAMESPACE));
acMsg.setInstanceId(activityCompleteElement.getChildText("instanceId", WORKFLOW_NAMESPACE));
acMsg.setTaskId(activityCompleteElement.getChildText("taskId", WORKFLOW_NAMESPACE));
acMsg.setTracingTag(activityCompleteElement.getChildText("tracingTag", WORKFLOW_NAMESPACE));
System.out.println(acMsg);
String status = null;
List<TaskInfo> taskInfoList = null;
ProcessManagerFactoryBean pmfb = new ProcessManagerFactoryBean();
ProcessManagerRemote pm = null;
try {
pm = pmfb.getProcessManager();
ProcessManagerService pms = new ProcessManagerService(pm, null);
pms.activityComplete(acMsg);
pm.applyChanges();
if (StringUtils.hasText(acMsg.getInstanceId()) && StringUtils.hasText(acMsg.getEndpoint())) {
taskInfoList = pms.getTaskInfo(acMsg.getInstanceId(), acMsg.getEndpoint());
}
status = "S";
} catch (Exception e) {