4
Overview StationPulsedFiberTestUI ReadNOVAModuleTransaction executeAfterNormalCompletion CheckDBForTestTransaction executeAfterNormalCompletion processBarCode CreateDetailsForModule – File chooser InsertPulsedFiberTestTransaction executeAfterNormalCompletion 1) Read in module barcode from scanner ) Create a PulsedFiberTestDetails object from files entered by user if this test has already been entered into the db using the details object and a native query. Quit if the test already exists, otherwise create a ReadNOVAModuleTransaction. ead the NOvA module object from the db and create a task for the pulsed fiber test. et the local NOvA module object and get the objectkey from the task that was created. Create a InsertPulsedFiberTestTransaction to insert pft data. ert the pulsed fiber test into the db and link it to the task that was created above. 8) Display to the user the created test. This design has the down side that if anything goes wrong after ReadNOVAModuleTransaction, the task created by it will still exist in the database when it should be deleted.

Overview

  • Upload
    fausta

  • View
    30

  • Download
    1

Embed Size (px)

DESCRIPTION

Overview. StationPulsedFiberTestUI. 1) Read in module barcode from scanner. processBarCode. 2) Create a PulsedFiberTestDetails object from files entered by user. CreateDetailsForModule – File chooser. - PowerPoint PPT Presentation

Citation preview

Page 1: Overview

Overview

StationPulsedFiberTestUI

ReadNOVAModuleTransaction

executeAfterNormalCompletion

CheckDBForTestTransaction

executeAfterNormalCompletion

processBarCode

CreateDetailsForModule – File chooser

InsertPulsedFiberTestTransaction

executeAfterNormalCompletion

1) Read in module barcode from scanner

2) Create a PulsedFiberTestDetails object from files entered by user

3) Check if this test has already been entered into the db using the details object and a native query.

4) Quit if the test already exists, otherwise create a ReadNOVAModuleTransaction.

5) Read the NOvA module object from the db and create a task for the pulsed fiber test.

6) Set the local NOvA module object and get the objectkey from the task that was created. Create a InsertPulsedFiberTestTransaction to insert pft data.

7) Insert the pulsed fiber test into the db and link it to the task that was created above.

8) Display to the user the created test.

This design has the down side that if anything goes wrong after ReadNOVAModuleTransaction, the task created by it will still exist in the database when it should be deleted.

Page 2: Overview

Server Side Client

WorkerRemote (getEJBHome)

checkIfTestExistsInDB

PulsedFiberTestBean PulsedFiberTestLocal

checkIfTestExistsInDB

WorkerBean

checkIfTestExistsInDB

checkIfTestExistsInDB

Details objects can only be usedEntities can be used

Used named query to search db for test with scan times found in pft data files.Should return null if there are no entries in the db already for this test.

StationPulsedFiberTestUI

ReadNOVAModuleTransaction

executeAfterNormalCompletion

CheckDBForTestTransaction

executeAfterNormalCompletion

processBarCode

CreateDetailsForModule – File chooser

InsertPulsedFiberTestTransaction

executeAfterNormalCompletionem.createNamedQuery(PulsedFiberTest.SEARCH_SCANTIMES_QUERY)Return existingPFTDetails if exists.

PulsedFiberTestDetails

Client and server can use details objects

Page 3: Overview

Server Side Client

WorkerRemote (getEJBHome)

readNOVAModuleCheckTestsCreateTask

NOvAModuleBean NOvAModuleLocal

readNOVAModule

WorkerBean

readNOVAModuleCheckTestsCreateTask

readNOVAModule

TaskBean TaskLocal

checkAllModuleTasksAndTestsForStation

addTaskPartAssemblyToModule addTaskPartAssemblyToModule

checkAllModuleTasksAndTestsForStation

Details objects can only be usedEntities can be used

Read the nova module from the database and create the task.Return a list of task objectkeys that are created (usually just 1 objectkey).

StationPulsedFiberTestUI

ReadNOVAModuleTransaction

executeAfterNormalCompletion

CheckDBForTestTransaction

executeAfterNormalCompletion

processBarCode

CreateDetailsForModule – File chooser

InsertPulsedFiberTestTransaction

executeAfterNormalCompletion

Now creates a list of objectkeys from the tasks created to return in DTO object.

Triggers often cause db to throw errors here.

1

23

Page 4: Overview

Server Side Client

WorkerRemote (getEJBHome)

createPulsedFiberTestsAndTasks

PulsedFiberTestBean PulsedFiberTestLocal

createTest

WorkerBean

createPulsedFiberTestsAndTasks

createTest

Details objects can only be usedEntities can be used

Return PulsedFiberTestDetails with all info from inserted data. StationPulsedFiberTestUI

ReadNOVAModuleTransaction

executeAfterNormalCompletion

CheckDBForTestTransaction

executeAfterNormalCompletion

processBarCode

CreateDetailsForModule – File chooser

InsertPulsedFiberTestTransaction

executeAfterNormalCompletion

PulsedFiberTestDetails

Client and server can use details objects

TestBean TestLocal

createTestAndTask createTestAndTask

1) Call createTestAndTask first.2) Use named query PulsedFiberTest.UPDATE_CELL_VALUES_QUERY and PulsedFiberTestDetails object to update the array values in db.

1) Call createPulsedFiberTest2) Create test and moduletest objects, then return PulsedFiberTestDetails object.

createPulsedFiberTest createPulsedFiberTest

1) Create pulsedfibertest here. This is where all the copying of details to persistence object and vice versa goes on.