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

(info) For this demo, the UserContactInfoResolverController implementation that needs to be used is org.socraticgrid.hl7.ucs.nifi.controller.user.MOCKUserContactInfoResolverControllerImpl.

Relevant Tasks

SprintAssigneeTaskStatus
Sprint 7Esteban(tick) SG-220: UCOM: Integration of the new UCS Alert Nifi processorsDEMO
Sprint 7Esteban(tick) SG-238: Implement UCSCancelMessage processorDEMO
Sprint 7Pavan(tick) SG-55: UCOM: Implementation of Alert ProcessorsDEMO
Sprint 8Pavan(tick) SG-248: Implement UCSAlertingUpdateAlertMessage processorDEMO
Sprint 8/9Pavan(tick) SG-239: Implement AlertMessage timeout mechanismDEMO
Sprint 8/9Esteban(tick) SG-211: UCOM: Implement an Alerting ClientDEMO
Sprint 8/9Basit(warning) SG-90: UCOM: Implement SFM Management InterfaceDONE (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:

  1. a new AlertMessage is present in UCS (UCSAlerting.receiveAlertMessage() implementation).
  2. an AlertMessage was updated in UCS (UCSAlerting.updateAlertMessage() implementation).
  3. 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

  1. Select "Inbox of Esteban Aliverti"
  2. Click on 
  3. Fill the New Alert form with the following information:
    1. From: Emory Fry
    2. Conversation: Conversation 1
    3. Subject: This is a sample Alert Message
    4. Body: This is the body of a sample Alert Message
    5. New Recipient: Add Esteban Aliverti
  4. Click on 
  5. 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.

  1. 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".
  2. 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.

  1. 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".
  2. 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.

  1. 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".
  2. 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.

  1. 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".
  2. 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.

  1. POST the following Alert Message to NiFi endpoint: http://192.168.1.229:8888/contentListener

    Alert Message Content
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <messageWrapper xmlns:model="http://org.socraticgrid.hl7.services.uc.model" xmlns:exceptions="http://org.socraticgrid.hl7.services.uc.exceptions">
    <message xsi:type="model:alertMessage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <model:parts>
    <model:content>Orginal message body</model:content>
    <model:type>text/plain</model:type>
    <model:tag></model:tag>
    </model:parts>
    <model:alertMessageHeader>
    <model:messageId>25c830a8-f1ad-462-ab09-5d88283b7</model:messageId>
    <model:relatedConversationId>c1</model:relatedConversationId>
    <model:alertStatus>New</model:alertStatus>
    <model:sender>
    <model:physicaladdress>
    <model:address>eafry</model:address>
    <model:serviceId>SMS</model:serviceId>
    </model:physicaladdress>
    </model:sender>
    <model:receiptNotification>true</model:receiptNotification>
    <model:recipientsList>
    <model:recipientId>148d07c5-656-4716-831b-c943e42842c3</model:recipientId>
    <model:deliveryAddress>
    <model:physicaladdress>
    <model:address>ealiverti</model:address>
    <model:serviceId>ALERT</model:serviceId>
    </model:physicaladdress>
    </model:deliveryAddress>
    <model:deliveryReceipt>false</model:deliveryReceipt>
    <model:readReceipt>false</model:readReceipt>
    <model:role/>
    <model:visibility>Public</model:visibility>
    </model:recipientsList>
    <model:subject>This is the original message</model:subject>
    <model:created>2015-02-26T14:54:19.740+01:00</model:created>
    <model:lastModified>2015-02-26T14:54:19.739+01:00</model:lastModified>
    <model:deliveryGuarantee>BestEffort</model:deliveryGuarantee>
    <model:dynamics>Asynchronous</model:dynamics>
    <model:priority>0</model:priority>
    <model:receiptNotification>true</model:receiptNotification>
    <model:retainFullyInLog>false</model:retainFullyInLog>
    <model:timeout>30000</model:timeout>
    <model:respondBy>1</model:respondBy>
    <model:onNoResponseAll xsi:type="model:alertMessage">
    <model:parts>
    <model:content>Escalation message body</model:content>
    <model:type>text/plain</model:type>
    <model:tag></model:tag>
    </model:parts>
    <model:alertMessageHeader>
    <model:messageId>64f0f4b-a7-4126-bed0-2e6ea020bea</model:messageId>
    <model:relatedConversationId>c1</model:relatedConversationId>
    <model:alertStatus>New</model:alertStatus>
    <model:sender>
    <model:physicaladdress>
    <model:address>eafry</model:address>
    <model:serviceId>SMS</model:serviceId>
    </model:physicaladdress>
    </model:sender>
    <model:receiptNotification>false</model:receiptNotification>
    <model:recipientsList>
    <model:recipientId>9842bf0a-dfd6-4119-a8f7-0234b4cad037</model:recipientId>
    <model:deliveryAddress>
    <model:physicaladdress>
    <model:address>eafry</model:address>
    <model:serviceId>ALERT</model:serviceId>
    </model:physicaladdress>
    </model:deliveryAddress>
    <model:deliveryReceipt>false</model:deliveryReceipt>
    <model:readReceipt>false</model:readReceipt>
    <model:role/>
    <model:visibility>Public</model:visibility>
    </model:recipientsList>
    <model:subject>This is an escalation</model:subject>
    <model:created>2015-02-26T14:54:19.740+01:00</model:created>
    <model:lastModified>2015-02-26T14:54:19.739+01:00</model:lastModified>
    <model:deliveryGuarantee>BestEffort</model:deliveryGuarantee>
    <model:dynamics>Asynchronous</model:dynamics>
    <model:priority>0</model:priority>
    <model:receiptNotification>true</model:receiptNotification>
    <model:retainFullyInLog>false</model:retainFullyInLog>
    <model:timeout>30000</model:timeout>
    <model:respondBy>0</model:respondBy>
    </model:alertMessageHeader>
    </model:onNoResponseAll>
    </model:alertMessageHeader>
    </message>
    </messageWrapper>

    Note: this message is an Alert to Esteban Aliverti that will generate an Alert escalation Message to Emory Fry after 1 minute.

  2. Go to Esteban Aliverti's Inbox and verify that a new Alert Message is present. 
  3. Got to Emory Fry's Inbox and verify that there is no new Alert Message there.
  4. Do nothing for at least 1 minute.
  5. 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.

(warning) 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.

  1. POST the following Alert Message to NiFi endpoint: http://192.168.1.229:8888/contentListener

    Alert Message Content
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <messageWrapper xmlns:model="http://org.socraticgrid.hl7.services.uc.model" xmlns:exceptions="http://org.socraticgrid.hl7.services.uc.exceptions">
    <message xsi:type="model:alertMessage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <model:parts>
    <model:content>Orginal message body</model:content>
    <model:type>text/plain</model:type>
    <model:tag></model:tag>
    </model:parts>
    <model:alertMessageHeader>
    <model:messageId>25c830a8-f1ad-462-ab09-58823b</model:messageId>
    <model:relatedConversationId>c1</model:relatedConversationId>
    <model:alertStatus>New</model:alertStatus>
    <model:sender>
    <model:physicaladdress>
    <model:address>eafry</model:address>
    <model:serviceId>SMS</model:serviceId>
    </model:physicaladdress>
    </model:sender>
    <model:receiptNotification>true</model:receiptNotification>
    <model:recipientsList>
    <model:recipientId>148d07c5-656-4716-831b-c943e42842c3</model:recipientId>
    <model:deliveryAddress>
    <model:physicaladdress>
    <model:address>ealiverti</model:address>
    <model:serviceId>ALERT</model:serviceId>
    </model:physicaladdress>
    </model:deliveryAddress>
    <model:deliveryReceipt>false</model:deliveryReceipt>
    <model:readReceipt>false</model:readReceipt>
    <model:role/>
    <model:visibility>Public</model:visibility>
    </model:recipientsList>
    <model:subject>This is the original message 2</model:subject>
    <model:created>2015-02-26T14:54:19.740+01:00</model:created>
    <model:lastModified>2015-02-26T14:54:19.739+01:00</model:lastModified>
    <model:deliveryGuarantee>BestEffort</model:deliveryGuarantee>
    <model:dynamics>Asynchronous</model:dynamics>
    <model:priority>0</model:priority>
    <model:receiptNotification>true</model:receiptNotification>
    <model:retainFullyInLog>false</model:retainFullyInLog>
    <model:timeout>30000</model:timeout>
    <model:respondBy>1</model:respondBy>
    <model:onNoResponseAll xsi:type="model:simpleMessage">
    <model:parts>
                <model:content>This is the content of the escalation Email 2</model:content>
                <model:type>text/plain</model:type>
            </model:parts>
            <model:simpleMessageHeader>
                <model:messageId>ff260af-0b7d-4ee-89f-06ed13cf7fee</model:messageId>
                <model:sender>
                    <model:physicaladdress>
                        <model:address>eafry</model:address>
                        <model:serviceId>SMS</model:serviceId>
                    </model:physicaladdress>
                </model:sender>
                <model:recipientsList>
                    <model:deliveryAddress>
                        <model:physicaladdress>
                            <model:address>ealiverti</model:address>
                            <model:serviceId>EMAIL</model:serviceId>
                        </model:physicaladdress>
                    </model:deliveryAddress>
                    <model:deliveryReceipt>false</model:deliveryReceipt>
                    <model:readReceipt>false</model:readReceipt>
                    <model:role/>
                    <model:visibility>Public</model:visibility>
                </model:recipientsList>           
                <model:subject>Escalation Message 2</model:subject>
                <model:created>2015-02-26T14:54:19.740+01:00</model:created>
                <model:lastModified>2015-02-26T14:54:19.739+01:00</model:lastModified>
                <model:deliveryGuarantee>BestEffort</model:deliveryGuarantee>
                <model:dynamics>Asynchronous</model:dynamics>
                <model:priority>0</model:priority>
                <model:receiptNotification>true</model:receiptNotification>
                <model:retainFullyInLog>false</model:retainFullyInLog>
                <model:timeout>30000</model:timeout>
            </model:simpleMessageHeader>
    </model:onNoResponseAll>
    </model:alertMessageHeader>
    </message>
    </messageWrapper>

    Note: this message is an Alert to Esteban Aliverti that will generate an Message (EMAIL) escalation Message to Esteban Aliverti after 1 minute.

  2. Go to Esteban Aliverti's Inbox and verify that a new Alert Message is present. 
  3. Do nothing for at least 1 minute.
  4. After the original Alert Message times out, a new Email should be sent to Esteban Aliverti email address.