Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Design brainstorming

by ksublondie (Friar)
on Apr 06, 2015 at 22:56 UTC ( [id://1122625]=perlquestion: print w/replies, xml ) Need Help??

ksublondie has asked for the wisdom of the Perl Monks concerning the following question:

Hi fellow monks! I'm not sure if my solution is going to be answered with perl or some other option, but I need some brainstorming help.

BACKGROUND: I have a CGI::Application intranet site on a Linux/apache server with sql2012 backend using filestream to store/organize our internal pdf forms. Forms are updated and maintained by a small group of end users. They use Adobe products (primarily LiveCycle) to edit the forms individually and upload to the sql db through a web interface I've created. This has been a pet project of mine for years to eliminate all the paper forms (*shudder*) and slowly transition to purely electronic form processing (*insert evil laugh here*).

Now I need to add the next and last step of the system to handle the submission and document tracking portion. Currently, they are placing the documents into a network share location and moving the pdfs to folders according to the next step of the process.

Handling the document tracking is fairly straight-forward with a datestamp field in the db for each step in the process. However, does anyone have suggestions on how the end-user is to submit the completed pdf form with a unique identifier field (to identify the specific form)? I don't want to depend on anyone to manually create a unique identifier field within the pdf document or any scripting whatsoever. Is there a module out there to add a unique identifier field and/or submit button and scripting to a pdf document when my form administrators upload an updated/empty form? I played a bit with an html form and embedding the form within the page using frames, but is there a way to essentially grab the filled out pdf with the form submission? I like the idea of the html form/pdf submission combo because I can grab the username from the session (no I don't even trust them to submit their name manually). Of course any pdf modules will need to be able use the submitted bitstream instead of a saved file. Ideally, I'd like to parse the pdf form fields and store the individual field values in order to store the form versions instead the document as a whole. Unfortunately, I only know enough about pdfs to be dangerous.

Does anyone have any ideas?

CLARIFICATION: Apparently, I'm not explaining myself well. I need to figure out how the user is to submit the completed pdf form including the unique id. I already have an id for each form stored in the db. I just can't figure out how to send the id back to the system so it knows which form it is.

Replies are listed 'Best First'.
Re: Design brainstorming
by bitingduck (Chaplain) on Apr 06, 2015 at 23:34 UTC

    (no I don't even trust them to submit their name manually)

    My employer has at least one form like this that takes employee number, then autofills my name and then dies with an error because my name is too long...

    More on topic: there are several modules that let you work with PDFs - the simplest thing to do is probably add your own timestamp or form ID to a submitted form, rather than extracting out all the details of the form. Adding a stamp should be relatively simple (I've gotten that far with PDFs). Extracting all the details requires that you anticipate all the possible things that can do in generating a new form, possibly to the extent of reverse engineering the form generator.

Re: Design brainstorming
by LanX (Saint) on Apr 06, 2015 at 22:59 UTC
    > Does anyone have any ideas?

    A meta idea, yes:

    What about changing to a meaningful title to attract the right "brains"?

    See also: How do I compose an effective node title?

    update

    I opened this thread in hope of a discussion about "brainstorming designs" or "designing brainstorms", and I feel somehow robbed of the time to decipher your intention. :/

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Re: Design brainstorming
by stevieb (Canon) on Apr 06, 2015 at 23:07 UTC

    Maybe I've misread, but can't you force a session that has a sessID/timestamp that pushes that ID to the client, then upon submission, it is caught upon POST? That way, if they refresh, you can put a unique ID in the session to do what you want of it. If I'm understanding you correctly (and I may not be), you could keep the info in the session for the db id, and eliminate it as necessary as the session refreshes/times-out.

    Or use a proper Revision Control System to fix all of your problems.

    -stevieb

      That's a thought...however, I know for a fact several end-users open up multiple forms at a time. If I store the id in the session, it would be set to the last opened form.
Re: Design brainstorming (form naming scheme)
by Anonymous Monk on Apr 07, 2015 at 00:01 UTC

    How many users? How are the forms related? Department? Location? what are the names used for?

    Assing colors to users, then number the forms ... or assign colors to departments, then letter number the forms, number the users ...

    red-10-40r00 dev-e10-40r01 blue-qc-42r12 ro-sham-bo-42r42 wal-tan-fox-04r20

    Or Data::UUID

      This is used by the entire organization. Current count: 200 users and 450+ forms...and growing. Each form already has a unique identifier in the database. Intranet requires login session based on ldap credentials, thus, I already know the user, department, and location from ldap group membership.

        This is used by the entire organization. Current count: 200 users and 450+ forms...and growing. Each form already has a unique identifier in the database. Intranet requires login session based on ldap credentials, thus, I already know the user, department, and location from ldap group membership.

        Heh, I don't understand your question, what is you're talking about?

        are you really asking how to edit pdfs to add some stuff (buttons/uuids)?

        Each form already has a unique identifier in the database.

        Maybe: $subID = sprintf '%s-%s-%s', $formID, $userID, $dateTimeStamp

Re: Design brainstorming
by marinersk (Priest) on Apr 07, 2015 at 20:52 UTC
    Internally, the fully qualified filename plus its modification timestamp should be pretty close to unique. Add the user's ID (or less reliably, full name) and you have a reasonable shot at uniqueness. If you need a user-friendly ID, shove the internally generated ID into a DB table with an auto-increment key and use it as a translation table.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1122625]
Approved by Ea
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-29 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found