Trouble with multiple DISPLAY DOCUMENT IN WINDOW actions

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
gerber1
Posts: 52
Joined: Wed Jun 15, 2011 2:48 pm
Location: Weston, FL, USA

Trouble with multiple DISPLAY DOCUMENT IN WINDOW actions

Post by gerber1 »

Summary:
My objective is to perform a DISPLAY REPORT ... IN WINDOW for each member of a small collection of Documents.

Direct Question:
Is there a way to cycle through a list of .pdf documents and display each of them in a separate window?
Failing this, I'll need to either extract and merge them all using pdftk or directly invoke Acrobat Reader for each one or something...

Structures Involved:
Object "ClientDocument" (member of group "Event", as is "PatientPanel") has an Attribute "Reports"
"Reports" has (1..*) of object "Report" (peer)
"Report" has one attribute "Report" of Native Type Document

The relevant Process script follows:
...
ELSE IF TYPE(Event) = 'ClientDocument' THEN
FIND Report WHERE Report IN Event.Reports AND Report.Name CONTAINS '.pdf' IN BATCHES OF 1
DISPLAY DOCUMENT Report.Report IN WINDOW
ELSE
...

Results I see:
If the SEARCH_COUNT of the FIND is 1, all works as expected. The single .pdf is shown, though see below for some still-odd behavior with DISPLAY .... Whenever SEARCH_COUNT is more than 1, I just see some screen flickering and no .pdf is displayed, not even the first one. All I need do is alter the Report.Name to '.pdx' instead of ".pdf" for 1 of 2 "Report" objects for my successful test case.

I have tried other approaches such as not using "IN BATCHES OF 1", intervening with a DISPLAY MESSAGE or DISPLAY QUESTION, as well as not using "IN WINDOW", all of which are no improvement.

Execution Transcript from test.log (edited for brevity):
Clearly, it is executing multiple DISPLAY DOCUMENT actions. It just is not performing the actions correctly.

Executing process RunEventReport with parameters: ClientDocument:158710Person:157753
Value of attribute Report of object Report could not be resolved
Value of PatientPanel could not be resolved
Started evaluation of rules
... skipped several tests that are false in this example...
Condition evaluated to true: ClientDocument=PatientPanel
Evaluating condition TYPE(Event)='ClientDocument'
Condition evaluated to true: ClientDocument=ClientDocument
Adding action FIND Report WHERE Report IN Event.Reports AND Report.Name CONTAINS '.pdf' IN BATCHES OF 1 to the agenda
Adding action DISPLAY DOCUMENT Report.Report IN WINDOW to the agenda
Adding action DISPLAY QUESTION 'Continue?' to the agenda (This was one thing I tried. Same result without it...)
Finished rule evaluation
Finished evaluation of rules
Executing action FIND Report WHERE Report IN Event.Reports AND Report.Name CONTAINS '.pdf' IN BATCHES OF 1
Found 2 objects
-Processing first 1 objects
Finished executing action FIND Report WHERE Report IN Event.Reports AND Report.Name CONTAINS '.pdf' IN BATCHES OF 1
Executing action DISPLAY DOCUMENT Report.Report IN WINDOW
Finished executing action DISPLAY DOCUMENT Report.Report IN WINDOW
Process RunEventReport is suspended. Its id is 6293
Resuming process 6293
-Processing next 1 objects
Executing action DISPLAY DOCUMENT Report.Report IN WINDOW
Finished executing action DISPLAY DOCUMENT Report.Report IN WINDOW
Finished resuming process 6293
Resuming process 6293
Finished resuming process 6293

In this case, there was no document displayed and no Question dialog, just flickering.

Using AIM 6.0, Build 2031 on Windows 7/64-bit
Roy
Post Reply