use of com.centurylink.mdw.service.Parameter in project mdw-designer by CenturyLinkCloud.
the class WorkflowLaunchConfiguration method notifyProcess.
public void notifyProcess(WorkflowProject workflowProject, String eventName, String message, Map<String, String> headers) {
try {
ActionRequestDocument msgdoc = ActionRequestDocument.Factory.newInstance();
ActionRequest actionRequest = msgdoc.addNewActionRequest();
com.centurylink.mdw.service.Action act = actionRequest.addNewAction();
act.setName("RegressionTest");
Parameter param = act.addNewParameter();
param.setName("SubAction");
param.setStringValue("NotifyProcess");
param = act.addNewParameter();
param.setName("EventName");
param.setStringValue(eventName);
param = act.addNewParameter();
param.setName("Message");
param.setStringValue(message);
String request;
if (workflowProject.isOldNamespaces())
request = DesignerCompatibility.getInstance().getOldActionRequest(msgdoc);
else
request = msgdoc.xmlText();
String response = workflowProject.getDesignerProxy().notifyProcess(request, headers);
if (writeToConsole)
writeToConsole("Notify Process Response", response + "\n");
} catch (Exception ex) {
showError(ex, "Send External Event", workflowProject);
}
}
Aggregations