**AWIPS DR 16776**

**HazCollect: handling multiple products with the same product ID, date
and time**

Title:

The HazCollect software does not handle the situation where multiple
products that have the same product ID arrive at the same time.

Detailed Description:

The HazCollect workstation sometimes produces two products at the same
time, with different text but the same product ID. The AWIPS HazCollect
software frequently only processes the second product, sending it to the
NWWS and CRS twice. The software needs to be modified to process the
first product as well as the second.

Testbed: FSLC

AWIPS Build OB5.1

Test date: 11/15/05

Testers: Battelle test team, Jon Adkins (HazCollect technical lead),
Woody Roberts (GSD), MarySue Schultz (GSD), Joel Nathan (OPS)

**Test Procedures**

Products were generated by the Battelle test team, forwarded to the
TNCF, and sent to FSLC via the WAN. For appropriate products, the
HazCollect software triggered on FSLC when the products were written to
the Text Database. When HazCollect software triggers, the following
actions should take place: the workstation should activate visible and
audible alarms; the text workstation should activate visible and audible
alarms; the product should be sent to the NWWS test system; the product
should be sent to the CRS test system, where it should be broadcast. In
the Actual Results column, if the test passed, all of these actions took
place. If there were any deviations, they are noted.

+----+-----------+----------------+------------------+---------------+
| Te | Test      | WMO Header     | Expected Results | Actual        |
| st | De        |                |                  | Results       |
| \# | scription | Counties /     |                  |               |
|    |           | Zones          |                  |               |
+====+===========+================+==================+===============+
| W  | 1 county  | WOUS97 KMFR    | FSLC should      | Pass          |
| A1 | / 1 WFO   | 151605         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEMFR         |                  |               |
|    |           |                |                  |               |
|    |           | ORC015-151620- |                  |               |
+----+-----------+----------------+------------------+---------------+
| W  | Marine    | WOUS97 KMFR    | FSLC should      | Pass, but it  |
| A5 | Zones     | 151610         | trigger.         | took several  |
|    |           |                |                  | minutes to    |
|    |           | CAEMFR         |                  | store the     |
|    |           |                |                  | product in    |
|    |           | PZZ3           |                  | the Text      |
|    |           | 56-376-151640- |                  | Database.     |
|    |           |                |                  |               |
|    |           |                |                  | See Note 1.   |
+----+-----------+----------------+------------------+---------------+
| W  | C         | WOUS97 KMFR    | FSLC should      | Pass          |
| A9 | ounties + | 151618         | trigger. This is |               |
|    | Marine    |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | ORC011-0       | product ID, date |               |
|    |           | 15-019-151648- | and time. Both   |               |
|    |           |                | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151618 RRA     | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | PZZ3           | product ID, date |               |
|    |           | 56-376-151648- | and time. Both   |               |
|    |           |                | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
| W  | 2 WFO     | WOUS97 KMFR    | FSLC should      | Pass          |
| A8 | marines   | 151622         | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | ORC011-015-0   | product ID, date |               |
|    |           | 19-033-151722- | and time. Both   |               |
|    |           |                | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151622 RRA     | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | PZZ3           | product ID, date |               |
|    |           | 56-376-151722- | and time. Both   |               |
|    |           |                | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
| T  | All of    | WOUS97 KPQR    | FSLC should      | Pass          |
| R2 | one state | 151633         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEOR          |                  |               |
|    |           |                |                  |               |
|    |           | ORC000-151648- |                  |               |
+----+-----------+----------------+------------------+---------------+
| WA | All       | WOUS97 KPQR    | FSLC should      | Pass          |
| 10 | counties, | 151638         | trigger.         |               |
|    | some      |                |                  |               |
|    | marine    | CAEOR          |                  |               |
|    |           |                |                  |               |
|    |           | ORC000-151808- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151638         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEMFR         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ350         |                  |               |
|    |           | -353-356-370-3 |                  |               |
|    |           | 73-376-151808- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151638         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZ             |                  |               |
|    |           | Z410-450-455-4 |                  |               |
|    |           | 70-475-151808- |                  |               |
+----+-----------+----------------+------------------+---------------+
| T  | Not all   | WOUS97 KPQR    | FSLC should      | Pass          |
| R3 | state     | 151645         | trigger.         |               |
|    | counties  |                |                  |               |
|    |           | CAEOR          |                  |               |
|    |           |                |                  |               |
|    |           | OR             |                  |               |
|    |           | C013-015-025-0 |                  |               |
|    |           | 39-045-151830- |                  |               |
+----+-----------+----------------+------------------+---------------+
| TR | Not all   | WOUS97 KPQR    | FSLC should      | Pass          |
| 3D | state     | 151648         | trigger.         |               |
|    | counties  |                |                  |               |
|    | (repeat   | CAEOR          |                  |               |
|    | of TR3:   |                |                  |               |
|    | changed   | OR             |                  |               |
|    | ORC015 to | C013-017-025-0 |                  |               |
|    | ORC017)   | 39-045-151833- |                  |               |
+----+-----------+----------------+------------------+---------------+
| T  | No SLO    | WOUS97 KPQR    | FSLC should      | Pass          |
| R5 |           | 151748         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEOR          |                  |               |
|    |           |                |                  |               |
|    |           | ORC000-151948- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151748         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEMFR         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ350         |                  |               |
|    |           | -353-356-370-3 |                  |               |
|    |           | 73-376-151948- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151748         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZ             |                  |               |
|    |           | Z410-450-455-4 |                  |               |
|    |           | 70-475-151948- |                  |               |
+----+-----------+----------------+------------------+---------------+
| W  | Out of    | WOUS97 KMFR    | FSLC should      | Pass          |
| A3 | state     | 151654         | trigger.         |               |
|    | WFOs      |                |                  |               |
|    |           | CAEMFR         |                  |               |
|    |           |                |                  |               |
|    |           | CAC093-151854- |                  |               |
+----+-----------+----------------+------------------+---------------+
| T  | Partial   | WOUS97 KEKA    | FSLC should NOT  | Pass          |
| R4 | states    | 151659         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | CAC0           |                  |               |
|    |           | 15-023-151959- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151659 RRA     | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZ             |                  |               |
|    |           | Z410-450-455-4 |                  |               |
|    |           | 70-475-151959- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151659         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEMFR         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ3           |                  |               |
|    |           | 56-376-151959- |                  |               |
+----+-----------+----------------+------------------+---------------+
| TR | Not all   | WOUS97 KREV    | FSLC should NOT  | Pass          |
| 3A | state     | 151704         | trigger.         |               |
|    | counties  |                |                  |               |
|    | (northern | CAEREV         |                  |               |
|    | Ca        |                |                  |               |
|    | lifornia) | CAC049-152004- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151704         | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | CAC0           | product ID, date |               |
|    |           | 49-093-152004- | and time. Both   |               |
|    |           |                | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151704 RRA     | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | PZZ3           | product ID, date |               |
|    |           | 56-376-152004- | and time. Both   |               |
|    |           |                | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151704         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | CAC015-152004- |                  |               |
+----+-----------+----------------+------------------+---------------+
| TR | Not all   | WOUS97 KSTO    | FLSC should      | Pass, but it  |
| 3B | state     | 151710         | trigger.         | took several  |
|    | counties  |                |                  | minutes to    |
|    | (         | CAECA          |                  | store this    |
|    | northwest |                |                  | product in    |
|    | coast)    | CAC023-035-0   |                  | the Text      |
|    |           | 89-105-152110- |                  | Database.     |
|    |           |                |                  |               |
|    |           |                |                  | See note 2.   |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass, but it  |
|    |           | 151710         | trigger.         | took several  |
|    |           |                |                  | minutes to    |
|    |           | CAEEKA         |                  | store this    |
|    |           |                |                  | product in    |
|    |           | PZ             |                  | the Text      |
|    |           | Z410-450-455-4 |                  | Database.     |
|    |           | 70-475-152110- |                  |               |
|    |           |                |                  | See note 2.   |
+----+-----------+----------------+------------------+---------------+
| T  | Some      | WOUS97 KSTO    | FSLC should      | Pass          |
| R6 | states,   | 151719         | trigger.         |               |
|    | some      |                |                  |               |
|    | counties  | CAECA          |                  |               |
|    |           |                |                  |               |
|    |           | CAC0           |                  |               |
|    |           | 15-093-152149- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KPQR    | FSLC should      | Pass          |
|    |           | 151719         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEOR          |                  |               |
|    |           |                |                  |               |
|    |           | ORC0           |                  |               |
|    |           | 15-033-152149- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151719         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEMFR         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ3           |                  |               |
|    |           | 56-376-152149- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151719         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ4           |                  |               |
|    |           | 50-470-152149- |                  |               |
+----+-----------+----------------+------------------+---------------+
| TR | Delete    | WOUS97 KSTO    | FSLC should      | Pass          |
| 15 | area      | 151726         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAECA          |                  |               |
|    |           |                |                  |               |
|    |           | CAC0           |                  |               |
|    |           | 15-093-152226- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151726         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ4           |                  |               |
|    |           | 50-470-152226- |                  |               |
+----+-----------+----------------+------------------+---------------+
| T  | Full SLOs | WOUS97 KSTO    | FSLC should      | Pass          |
| R7 | (actually | 151730         | trigger.         |               |
|    | had to    |                |                  |               |
|    | remove    | CAECA          |                  |               |
|    | one       |                |                  |               |
|    | county to | CAC001-003-    |                  |               |
|    | get this  | 005-007-009-01 |                  |               |
|    | to work)  | 1-013-015-017- |                  |               |
|    |           | 019-021-023-02 |                  |               |
|    |           | 5-027-029-031- |                  |               |
|    |           |                |                  |               |
|    |           | 033-035-037-   |                  |               |
|    |           | 039-041-043-04 |                  |               |
|    |           | 5-047-049-051- |                  |               |
|    |           | 053-055-057-05 |                  |               |
|    |           | 9-061-063-065- |                  |               |
|    |           |                |                  |               |
|    |           | 067-069-071-   |                  |               |
|    |           | 073-075-077-07 |                  |               |
|    |           | 9-081-083-085- |                  |               |
|    |           | 087-089-091-09 |                  |               |
|    |           | 3-095-097-099- |                  |               |
|    |           |                |                  |               |
|    |           | 101-103-105    |                  |               |
|    |           | -107-109-111-1 |                  |               |
|    |           | 13-115-152300- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151730         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ4           |                  |               |
|    |           | 50-470-152300- |                  |               |
+----+-----------+----------------+------------------+---------------+
| TR | Some      | WOUS97 KMFR    | FSLC should      | Pass          |
| 54 | counties  | 151738         | trigger. This is |               |
|    | (south    |                | one of two       |               |
|    | Oregon)   | ADRMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | ORC011-015     | product ID, date |               |
|    |           | -019-029-033-0 | and time. Both   |               |
|    |           | 35-037-151753- | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151738 RRA     | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | ADRMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | PZZ350         | product ID, date |               |
|    |           | -353-356-370-3 | and time. Both   |               |
|    |           | 73-376-151753- | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151738         | trigger.         |               |
|    |           |                |                  |               |
|    |           | ADREKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZZ470-151753- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KPQR    | FSLC should NOT  | Pass          |
|    |           | 151738         | trigger.         |               |
|    |           |                |                  |               |
|    |           | ADRPQR         |                  |               |
|    |           |                |                  |               |
|    |           | ORC039-151753- |                  |               |
+----+-----------+----------------+------------------+---------------+
| TR |           | WOUS97 KMFR    | FSLC should      | Pass          |
| 5A |           | 151757         | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | ORC011-015     | product ID, date |               |
|    |           | -019-029-033-0 | and time. Both   |               |
|    |           | 35-037-151957- | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KMFR    | FSLC should      | Pass          |
|    |           | 151757 RRA     | trigger. This is |               |
|    |           |                | one of two       |               |
|    |           | CAEMFR         | products that    |               |
|    |           |                | have the same    |               |
|    |           | PZZ350         | product ID, date |               |
|    |           | -353-356-370-3 | and time. Both   |               |
|    |           | 73-376-151957- | products should  |               |
|    |           |                | be processed.    |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KSTO    | FSLC should      | Pass          |
|    |           | 151757         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAECA          |                  |               |
|    |           |                |                  |               |
|    |           | CAC093-151957- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KPDT    | FSLC should NOT  | Pass          |
|    |           | 151757         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEPDT         |                  |               |
|    |           |                |                  |               |
|    |           | OR             |                  |               |
|    |           | C013-017-021-0 |                  |               |
|    |           | 23-031-049-055 |                  |               |
|    |           | -059-061-063-0 |                  |               |
|    |           | 65-069-151957- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KPQR    | FSLC should NOT  | Pass          |
|    |           | 151757         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEPQR         |                  |               |
|    |           |                |                  |               |
|    |           | ORC003-005     |                  |               |
|    |           | -007-009-027-0 |                  |               |
|    |           | 39-041-043-047 |                  |               |
|    |           | -051-053-057-0 |                  |               |
|    |           | 67-071-151957- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KBOI    | FSLC should NOT  | Pass          |
|    |           | 151757         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEBOI         |                  |               |
|    |           |                |                  |               |
|    |           | ORC001-0       |                  |               |
|    |           | 25-045-151957- |                  |               |
+----+-----------+----------------+------------------+---------------+
|    |           | WOUS97 KEKA    | FSLC should NOT  | Pass          |
|    |           | 151757         | trigger.         |               |
|    |           |                |                  |               |
|    |           | CAEEKA         |                  |               |
|    |           |                |                  |               |
|    |           | PZ             |                  |               |
|    |           | Z410-450-455-4 |                  |               |
|    |           | 70-475-151957- |                  |               |
+----+-----------+----------------+------------------+---------------+

**Notes**

1.  This problem was caused by a product that was received earlier. The
    Text Database writer log file shows that MSPRWRMN took 254.059
    seconds to store in the database. Products that were received
    afterwords were held up for several minutes, waiting for this
    product to be written. The log file also shows that the HazCollect
    product (PDXCAEMFR) took only 0.405 seconds to write to the
    database. The HazCollect code was triggered at 16:15:11.553.

> 16:10:49.576 TextDB_Impl.C VERBOSE: Write Request: MSPRWRMN
>
> 16:15:03.636 TextDB_Server.C EVENT: MSPRWRMN ASUS43 151610 8349
> 254.059
>
> 16:15:11.249 TextDB_Impl.C VERBOSE: Write Request: PDXCAEMFR
>
> 16:15:11.553 TextDB_Impl.C VERBOSE: Update Trigger kickoff SQLCODE: 0
>
> 16:15:11.654 TextDB_Server.C EVENT: PDXCAEMFR WOUS97 151610 996 0.405

2.  There was a product that was received several minutes earlier that
    took more than 5 minutes to write to the database. The products that
    came in afterwords were held up for several minutes waiting for this
    product to be written. The HazCollect software is not involved in
    this problem. The log messages from the Text Database writer show
    that SATMTRPIL took 339.130 seconds to write to the database. The
    next HazCollect products (SFOCAECA and SFOCAEEKA) that were created
    at 17:10 were not written to the database until 17:15. The log file
    also shows that it only took 0.683 seconds to store SFOCAECA, and
    0.214 seconds to store SFOCAEEKA. The HazCollect code was triggered
    at 17:15:14.303.

> 17:09:23.238 TextDB_Impl.C VERBOSE: Write Request: SATMTRPIL
>
> 17:15:02.368 TextDB_Server.C EVENT: SATMTRPIL SAUS70 151700 132
> 339.130
>
> 17:15:13.919 TextDB_Impl.C VERBOSE: Write Request: SFOCAECA
>
> 17:15:14.303 TextDB_Impl.C VERBOSE: Update Trigger kickoff SQLCODE: 0
>
> 17:15:14.602 TextDB_Server.C EVENT: SFOCAECA WOUS97 151710 1004 0.683
>
> 17:15:15.199 TextDB_Impl.C VERBOSE: Write Request: SFOCAEEKA
>
> 17:15:15.413 TextDB_Server.C EVENT: SFOCAEEKA WOUS97 151710 1004 0.214