Sprint 7, 8 and 9 Demo
Info
NiFi URL: http://192.168.1.229:8070/nifi
Demo Workbench URL: http://192.168.1.229:8080/ucs-nifi-test-workbench/
Demo Inbox URL: http://192.168.1.229:8080/ucs-nifi-test-workbench/inbox.html
NiFi endpoint: http://192.168.1.229:8888/contentListener
For this demo, the UserContactInfoResolverController implementation that needs to be used is org.socraticgrid.hl7.ucs.nifi.controller.user.MOCKUserContactInfoResolverControllerImpl.
Relevant Tasks
Sprint | Assignee | Task | Status |
---|---|---|---|
Sprint 7 | Esteban | SG-220: UCOM: Integration of the new UCS Alert Nifi processors | DEMO |
Sprint 7 | Esteban | SG-238: Implement UCSCancelMessage processor | DEMO |
Sprint 7 | Pavan | SG-55: UCOM: Implementation of Alert Processors | DEMO |
Sprint 8 | Pavan | SG-248: Implement UCSAlertingUpdateAlertMessage processor | DEMO |
Sprint 8/9 | Pavan | SG-239: Implement AlertMessage timeout mechanism | DEMO |
Sprint 8/9 | Esteban | SG-211: UCOM: Implement an Alerting Client | DEMO |
Sprint 8/9 | Basit | SG-90: UCOM: Implement SFM Management Interface | DONE (NOT YET INTEGRATED) |
Individual Tasks
SG-220: UCOM: Integration of the new UCS Alert Nifi processors
This also includes SG-55: UCOM: Implementation of Alert Processors and SG-248: Implement UCSAlertingUpdateAlertMessage processor
2 new sub-workflows: "Alerting Interface" and "UCS Alerting Interface":
"Alerting interface" is based on "Client interface": HTTP command pattern with 2 concrete commands: UCSAlertingUpdateAlertMessage (UCSAlerting.updateAlertMessage() implementation) and UCSRegisterUCSAlertingCallback. All commands ALWAYS sends back a response to the invoker. This allows more reliable communication between the invoker and nifi (This was also implemented in "Client Interface" sub-workflow).
"UCS Alerting interface" is based on "UCS Client interface": all registered callbacks are notified about 3 different events:
- a new AlertMessage is present in UCS (UCSAlerting.receiveAlertMessage() implementation).
- an AlertMessage was updated in UCS (UCSAlerting.updateAlertMessage() implementation).
- an AlertMessage was cancelled in UCS (UCSAlerting.cancelAlertMessage() implementation).
SG-238: Implement UCSCancelMessage processor
UCSCancelMessage processor was implemented and integrated into "Client Interface" sub-workflow. This processor implements Client.cancelMessage() operation.
SG-211: UCOM: Implement an Alerting Client
The test workbench was enhanced to support an inbox-like UI that allow us to send and receive simple (not nested) AlertMessages.
Inbox URL: http://192.168.1.229:8080/ucs-nifi-test-workbench/inbox.html
Test Case 1: Create a new Alert Message
- Select "Inbox of Esteban Aliverti"
- Click on
- Fill the New Alert form with the following information:
- From: Emory Fry
- Conversation: Conversation 1
- Subject: This is a sample Alert Message
- Body: This is the body of a sample Alert Message
- New Recipient: Add Esteban Aliverti
- Click on
- Check that Esteban Aliverti's inbox has the created Alert Message.
Test Case 2: Update Alert Message Status
Prerequisites: Esteban Aliverti's inbox must have at least 1 Alert in "Pending" status.
- In the Action column of the inbox, click on the 'ACK' action of the Alert you want to modify. Make sure that the Alert Status is "Pending".
- The Alert must be now in "Acknowledged" Status.
Note: The status of the Alert in the inbox is changed because UCS pushed a notification about a Message being updated to the Inbox.
Test Case 3: Innocuous Alert Message Status update
Prerequisites: Esteban Aliverti's inbox must have at least 1 Alert in "Acknowledged" status.
- In the Action column of the inbox, click on the 'ACK' action of the Alert you want to modify. Make sure that the Alert Status is "Acknowledged".
- Nothing should happen in the UI.
Note: In this case, given that the Alert was already Acknowledged, nothing is notified to the Inbox. The update silently dies inside UCS.
Test Case 4: Cancel Alert Message
Prerequisites: Esteban Aliverti's inbox must have at least 1 Alert in "Pending" status.
- In the Action column of the inbox, click on the 'CANCEL' action of the Alert you want to modify. Make sure that the Alert Status is "Pending".
- The Alert must be now in "Retracted" Status.
Note: The status of the Alert in the inbox is changed because UCS pushed a notification about a Message being cancelled to the Inbox.
Test Case 5: Invalid Alert Message Status update
Prerequisites: Esteban Aliverti's inbox must have at least 1 Alert in "Retracted" status.
- In the Action column of the inbox, click on the 'ACK' action of the Alert you want to modify. Make sure that the Alert Status is "Retracted".
- An error message with a brief explanation of what went wrong must appear in the UI.
Note: The error message in the UI comes from a synchronous exception that happened when the client executed UCSAlerting.updateAlertMessage() method. This error is not coming - in an asynchronous way - from UCSClient.handleException().
SG-239: Implement AlertMessage timeout mechanism
Alert Messages timeout can't be 100% tested from within the Inbox UI. The Inbox currently doesn't support the creation of nested messages (required for escalation/re-routing).
An Alert Message times out when its AlertMessageHeader.respondBy time expires and the status of the Alert Message is still 'Pending'. The workflow executed by this operation is the same as the mechanism used by Response Timeout in regular Messages. Escalation Messages enters NiFi through UCSProcessResponseTimeout processor.
Test Case 1: Send an Alert Message on timeout.
POST the following Alert Message to NiFi endpoint: http://192.168.1.229:8888/contentListener
Note: this message is an Alert to Esteban Aliverti that will generate an Alert escalation Message to Emory Fry after 1 minute.
- Go to Esteban Aliverti's Inbox and verify that a new Alert Message is present.
- Got to Emory Fry's Inbox and verify that there is no new Alert Message there.
- Do nothing for at least 1 minute.
- After the original Alert Message times out, a new Alert should be present in Emory Fry's Inbox.
Test Case 2: No timeout for "Acknowledged" Alert Messages.
Repeat the steps from previous test case, but now "ACK" the Alert Message in Esteban Aliverti's inbox as soon as it's created.
Note: Make sure you use different <model:messageId> from the messages (2 occurrences in the sample XML).
After a couple of minutes check that there is no escalation message for Emory Fry.
Test Case 3: Send a Message (EMAIL) on timeout.
POST the following Alert Message to NiFi endpoint: http://192.168.1.229:8888/contentListener
Note: this message is an Alert to Esteban Aliverti that will generate an Message (EMAIL) escalation Message to Esteban Aliverti after 1 minute.
- Go to Esteban Aliverti's Inbox and verify that a new Alert Message is present.
- Do nothing for at least 1 minute.
- After the original Alert Message times out, a new Email should be sent to Esteban Aliverti email address.