* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
+
package org.openecomp.mso.bpmn.common;
import static org.junit.Assert.assertEquals;
" \"eventType\": \"UCPE-ACTIVATION\"," + EOL +
" \"eventCorrelatorType\": \"UCPE-HOST-NAME\"," + EOL +
" \"eventCorrelator\": \"((CORRELATOR))\"," + EOL +
- " \"params\": {\"entry\":[" + EOL +
- " {\"key\": \"success-indicator\", \"value\":\"Y\"}" + EOL +
- " ]}" +EOL +
+ " \"params\": {" + EOL +
+ " \"success-indicator\":\"Y\"" + EOL +
+ " }" +EOL +
" }" + EOL +
"}" + EOL);
" \"eventType\": \"UCPE-ACTIVATION\"," + EOL +
" \"eventCorrelatorType\": \"UCPE-HOST-NAME\"," + EOL +
" \"eventCorrelator\": \"((CORRELATOR))\"," + EOL +
- " \"params\": {\"entry\":[" + EOL +
- " {\"key\": \"success-indicator\", \"value\":\"N\"}" + EOL +
- " {\"key\": \"error-message\", \"value\":\"SOMETHING BAD HAPPENED\"}" + EOL +
- " ]}" +EOL +
+ " \"params\": {" + EOL +
+ " \"success-indicator\":\"N\"," + EOL +
+ " \"error-message\":\"SOMETHING BAD HAPPENED\"" + EOL +
+ " }" +EOL +
" }" + EOL +
"}" + EOL);
}
"subprocess/ReceiveWorkflowMessage.bpmn"
})
public void happyPath() throws Exception {
-
+
logStart();
String businessKey = UUID.randomUUID().toString();
System.out.println("Response:\n" + response);
assertTrue(response.contains("\"SDNCEvent\""));
assertTrue((boolean)getVariableFromHistory(businessKey, "RCVWFMSG_SuccessIndicator"));
-
+
logEnd();
}
"subprocess/ReceiveWorkflowMessage.bpmn"
})
public void timeout() throws Exception {
+
logStart();
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
variables.put("isDebugLogEnabled", "true");
- variables.put("RCVWFMSG_timeout", "PT0.1S");
+ variables.put("RCVWFMSG_timeout", "PT5S");
variables.put("RCVWFMSG_messageType", "SDNCAEvent");
variables.put("RCVWFMSG_correlator", "USOSTCDALTX0101UJZZ31");
invokeSubProcess("ReceiveWorkflowMessage", businessKey, variables);
// No injection
-
+
waitForProcessEnd(businessKey, 10000);
-
+
// There is no response from SDNC, so the flow doesn't set WorkflowResponse.
String response = (String) getVariableFromHistory(businessKey, "WorkflowResponse");
assertNull(response);
System.out.println(wfe.toString());
assertEquals("Receive Workflow Message Timeout Error", wfe.getErrorMessage());
assertFalse((boolean)getVariableFromHistory(businessKey, "RCVWFMSG_SuccessIndicator"));
-
+
logEnd();
}
}