Naming of PDFs / Document Mangement

Contains tips for configurators working with Aware IM
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Naming of PDFs / Document Mangement

Post by tford »

I've created a BSV that I call DocumentManager to test out some concepts.

One main thing that it solves is the naming of the PDF files to "real" names (rather than AwareIM's default PDF name of RDDoc......). That was a real stumbling block that I needed to solve because the users MS Access systems I have created are accustomed to PDF names that are very descriptive -- in fact they are dynamically generated to include the from / to dates of monthly financial reports. Naming like this makes historical archiving of the PDFs very intuitive.

What I'll describe below is the first cut & I'm sure can be improved:

1- Create a BO: DocumentManager

2- DocumentManager attributes:
a- DateTimeStored - type: timestamp
b- Department - type: plain text -- used for categorizing
c- Description - type: plain text -- describes content of report
d- Doc - type: document -- holds the PDF report
e- ReportNumber - report # that is printed on top right of each report

DocumentManager BO is a place that will hold PDFs and appropriate descritions of those reports.

Next step is to create a Process that will send an AwareIM Document to the DocumentManager BO. The EXPORT & subsequest IMPORT allow for a "real" name to be applied to the report. Steps in a sample 4 step process:
--------------------------------------------
1) EXPORT DOCUMENT SampleReport1 TO FILE 'c:/AwareIM/Sample Report 1.pdf'

2) CREATE DocumentManager WITH DocumentManager.Description='Sample Report 1 sorted by attribute 1',DocumentManager.Department='Finance',DocumentManager.ReportNumber='301'

3) IMPORT DOCUMENT DocumentManager.Doc FROM 'c:/AwareIM/Sample Report 1.pdf'

4) DISPLAY 'Documents Available to View'
--------------------------------------------

Step 4 is a Query that displays all items in the DocumentManager BO with the most recent item on the top line. I have 2 buttons on each line: Email & View. Email will send the given report to the LoggedInRegularUser 's email address & view performs a DISPLAY DOCUMENT. The difference here is that the PDF displayed is named with the 'real' name assigned by the process.


One remnant of this process is that PDFs are left on the server hard drive from the EXPORT process in Step 1. Can anyone help me with a procedure that would delete that PDF after IMPORT DOCUMENT from Step 3 is complete?

In addition to "real names" for PDFs, the DocumentManager BO allows someone in an organization to control the report flow if that is desired. We have some situations where we want to review reports before making them available to clients or other departments, so the DocumentManager wil allow reports to be produced & reviewed by 1 department before being made available to others in a Query / email process.

I'd love to hear feedback about suggestions for improvement / application to other scenarios, etc.

Tom
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi Tom,

Okay, this is probably the least elegant solution, I am sure that Support can offer a rule that can do the job, but one option would be to run a scheduled bat file on the server that deletes the folder contents daily.

del c:\AwareIM\Export_Folder/q/f

The /q means it won't ask for confirmation.
The /f will force deletion of read-only files.

Cheers,
Pete
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Post by Hubertus »

Hello,

I'm currently working on a custom process that reads the contents (file names) of specified directories and puts them into a BO. IMO this would ease the document handling issues. I hope that I'll find the time to finish this until the end of the week. Just in case someone would be interested...

Hubertus
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Using some info from http://www.awareim.com/forum/viewtopic.php?t=1723, I was finally able to come up with a method to get rid of AwareIM's "Please click here to see document ...." dialog & display a PDF with a "real" name -- all in 1 process.

Step 1: Create 2 SystemSettings attributes:
a- DocumentDisplayPathPrefix - type: Plain text
b- DocumentExportPathPrefix - type: Plain text

Step 2: Create 4 RegularUser attributes -- all Plain Text & calculated :
a- DocumentNameBeforeReplace
b- DocumentPathRelative
c- DocumentNameCleaned
d- DocumentPathFull

Step 3: 3 RegularUser rules:
a- LoggedInSystemUser.DocumentNameCleaned=REPLACE_PATTERN(LoggedInSystemUser.DocumentNameBeforeReplace,' ','_')+'.pdf'

b- LoggedInSystemUser.DocumentPathRelative=SystemSettings.DocumentDisplayPathPrefix+LoggedInSystemUser.DocumentNameCleaned

c- LoggedInSystemUser.DocumentPathFull=SystemSettings.DocumentExportPathPrefix+LoggedInSystemUser.DocumentNameCleaned

Step 4: 3 step process for each report / document you want to create:
a- LoggedInRegularUser.DocumentNameBeforeReplace='Sample Report 1'
b- EXPORT DOCUMENT SampleReport1 TO FILE LoggedInSystemUser.DocumentPathFull
c- DISPLAY URL LoggedInSystemUser.DocumentPathRelative

Step 5: When running the system, load the following values into the SystemSettings fields
a-DocumentDisplayPathPrefix: PDFs/
b-DocumentExportPathPrefix: c:/AwareIM/Tomcat/webapps/AwareIM/PDFs/

Step 6: Create a subdirectory named PDFs under the path c:/AwareIM/Tomcat/webapps/AwareIM on your server

When you execute the process from Step 4, the system will immediately show the PDF on the screen with no dialogs. If you click on the SAVE icon,the user will be able to save the PDF to their hard drive with the 'real' name assigned in Step 4a. Note that in Step 4a, report names can be built with arthmetic formula so that the PDF file names can be very intuitive.

If anyone has any suggestions for improvement, I'd be glad to get them.

Tom

PS -- it would be great if some day AwareIM could incorporate into the DISPLAY URL function the 3 options given in a URL type option in a Visual Perspecitive menu option -- 1) open in a new window 2)open in the same window full screen 3)open inside the main page.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Hubertus,

Were you able to complete the process you mentioned in your July 24, 2007 post? If so, would you be willing to share it with us?

Thanks,
Tom
Post Reply