This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Document Distribution Recording

Brian - Tuesday, July 28, 2009 8:06 PM:

Hi all,

We are looking at what is required to track Distribution of Documents (Electronic Files) to external entities (ie not part of the company) including automatic update if the document they have been sent is changed.

I'm not entirely sure of the best approach within Innovator and thought I would ask if anyone has already done some or all of this and would be willing to suggest a direction or supply a community project?

Regards,

Brian.



RobMcAveney - Wednesday, July 29, 2009 1:58 AM:

Hi Brian -

I don't have anything that covers this case exactly, but I can suggest an approach:

  1. Model the external entities as an ItemType, including the email address to be notified
  2. Create a RelationshipType from Document to the new ItemType
  3. Create an Action on Document that sends the initial distribution email and creates a relationship to the notified entity
  4. Use a post-transition method on the transition to the Released state to send notifications to all external entities attached to the Document

My guess is that the hardest part of this will be dealing with the files themselves.  Do you want to send them as attachments to the email or provide a link?  Attaching the files may be an issue just due to size limitations for email.  If you go that route, I'd definitely suggest compressing them first.  If you're going to send links, you have a couple options.  It may be worthwhile to simply send links back to the Innovator Document item and set up permissions such that the external entities can only get to the specific Documents assigned to them.  Another approach would be to copy the files out of the vault into web-accessible folders specific to each external entity.  Let me know which approach you want to pursue and I can give you a few more hints.

Regards -

Rob



Brian - Wednesday, July 29, 2009 6:10 PM:

Hi Rob,

Thanks for the input. An additional wrinkle is that I would like general users to be able to start the Document Distribution process without the Document needing to be edited but to be able to see the Distribution information from the Document form (as a Tab). To achieve this I believe that I need to capture the records in an external relationship (Say Document Distribution Item with Document and Files as relationships along with Recipient information) then also implement a method from the new Document "Distribution" tab to retrieve the relevant information.

We were thinking that direct attachment of the files to the Emails is the desired route. IT is not comfortable at present with exposing the Intranet to the outside world.

I'll keep defining our requirements and doing some testing and keep you informed.

Cheers,

Brian.



PeterSchroer - Wednesday, July 29, 2009 6:26 PM:

Brian -  I modeled something similar for another company.  In this case we created a new itemType to represent the Distribution.   Has a pointer to the recipient,  and a tab with the list of documents.        We used a separate ItemType for the reason you point out...   the person who is creating the Document Distribution,  does not have Edit access on the Document itself.             We didn't go as far as a list of Reciepents on the tab of the Document,  but you could do this with a Configurable Grid quite easily.

Here's a screen shot of the Document Distribution we did for Petro-Chem.  They called it a Letter of Transmittal,  but I think the intent is the same as you describe.

There are enough fields and checkboxes on the form to provide input into a  Email Cover letter,  and then the files would be attached to the email.      As Rob noted,  sending files from the vault on an email is easy....    knowing ahead of time that you won't be exceeding the mail size limits is harder.    Since Innovator knows the file sizes,   you could add a warning to the user of they add more than 5MB of files,  or automatically send multiple emails to the recipient,  each with just one file attached.

Peter



Brian - Wednesday, July 29, 2009 7:22 PM:

Thanks Peter. That is almost exactly what I'm after.

I think I would add a Recipients tab to allow selection of different recipients within the company and in fact I was considering allowing the same distribution to multiple companies. That may complicate things overly and not give significant benefit so I will keep thinking about that.

Since Documents can have multiple Files attached does your model allow the user to select particular Files or are they all transmitted if the Document is selected?

I was trying to think of a way (probably using a Configurable Grid) in which I could select Documents and based on these further refine to select only particular Files from the Document. We commonly store original documents (CAD, Word etc) and PDF versions for easy viewing and I can imagine that we would often only want to send the PDF version.

Still working through how to make the Grid do this or possibly based on the model you have provided could I get the selected Documents and then populate another Tab with the available Files? The user then selects the Files from this Tab.

Then attached the whole thing to a simple workflow to allow approval of the Distribution.

I don't suppose there is any chance of getting the package for the model you have pictured?

Regards,

Brian.



RobMcAveney - Wednesday, July 29, 2009 7:27 PM:

I like Peter's approach.  If you want to track multiple properties for the external entity or for the distribution notice, this is definitely the way to go.  I just wanted to add that the permission issues for adding a relationship to a released Document can be worked around using the GrantIdentity mechanism.  You would effectively be writing a method that gave limited rights to all users to perform a specific operation like adding a relationship.  This method could also suppress versioning the document using the version="0" flag.  So, if the distribution is little more than a link from the Document record to the external entity I'd suggest a relationship on Document.  If there's more to it (like in Peter's screenshot), then create a relationship from Distribution to Document and a configurable grid to show the tab on Document.

Rob



PeterSchroer - Wednesday, July 29, 2009 9:14 PM:

Brian - 

Since this was a protoype/benchmark,  I did not make a package at the time.     Just put the itemtype, form, lists, relationships into a new package,   and you're welcome to use  (as-is,    I haven't tested it).      This was originally built in v 8.2.0,   I suspect you'll get an error message when Importing to 9.1.    let me know if anything is missing,  or you can't resolve the import errors    [email protected]   

I am attaching the file to this post. 

 http://www.aras.comhttp://www.aras.com/Community/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/7/1106.Petro_2D00_Chem.zip

Peter



Brian - Wednesday, July 29, 2009 7:47 PM:

Rob,

I think the more detailed approach is valid in this case but I am pleased to know that there is a way of adding relationships without having to Edit the Item. I have also been pondering the ability to add a new Vendor for a Part without having to edit the Part record. This approach should let me do that.

Cheers,

Brian.



Brian - Thursday, July 30, 2009 9:31 PM:

Thanks Peter.

While IT are getting around to having this installed I am looking at some of the variations that I would like to implement.

As noted earlier we store multiple Files against some of our documents. I am trying to set up a Grid to restrict the choice of Files to those already selected as Documents for Distribution. The user would then indicate in the Grid which Files are to actually be sent out.

I can display all of the Files that are available against a selected Document but I can't figure out where user data entered into the Grid should end up. Where does it get saved to?

Is this doing it the hard way or does this make sense as an approach?

Regards,

Brian.



RobMcAveney - Wednesday, July 29, 2009 8:09 PM:

Brian -

You may want to check out the MCO (Manufacturing Change Order) capability in 9.1.  It does exactly what you're talking about for Parts, only with Manufacturers instead of Vendors.

Rob



PeterSchroer - Thursday, July 30, 2009 10:11 PM:

Sounds like what you need is the Filtered Item Browser....   I'll explain.      Sounds like one Tab for the user to list the Documents that are tagged for this Distribution.   You need another Tab to list the subset of files.      A Filtered Item Broser is a Method connected to a OnSearchDialog event,  in this case you would use the filtered browser when the user is adding files to the 2nd Tab.  The method executes and finds the ID of Files related to Documents that are listed on Tab#1,   substract the ID of Files already selected,  and present the end-user with a list of files allowed for selection to add to the 2nd tab.    1-2 hours of work,    level of complexity=medium.  

More elegant would be combining the concepts into a single UI,  maybe like a tree view on a Tab,  with the Files for each Document indented under the Document with a Checkbox to indicate Inclusion in the distribution.      As the user adds Documents to the Tab,  the Tree-View also displays the Files under the document.        Simpler UI for the User.          about 6-8 hours of work.    You're basically replacing the standard Aras Relationship grid with a form,  that implements  the tree-view and has the selection logic.         Check out Rob's latest version of the Multi-Level BOM display community project,  this has about 70% of the code and ui controls that you will need.

Peter



Brian - Wednesday, August 5, 2009 7:32 PM:

I like the idea of the Tree View but will go with the Filtered Item Browser to start with.

I've set up a relationship which triggers the OnSearchDialog when a new item is added and think I have a reasonable handle on filtering the search dialog.

I am really struggling with accessing the grid on the tab with the Documents which have already been selected in order to then retrieve the list of possible files.

Is there an easier way of getting at this list of selected Documents?

I had considered forcing a save of the "Document Distribution" item then retrieving the whole thing as AML from the server but that seems like a clumsy approach.

Any suggestions?

Thanks,

Brian.



Brian - Tuesday, August 11, 2009 9:15 PM:

OK. So I am making progress.

Provided the Tab which contains the list of Documents which are the containers for the Files has been loaded I can get to the grid and retrieve the list of Files for each Document.

How can I set the Filter on the searchDialog to more than one item?

var retObj = new Object();
retObj["id"] = { filterValue:FILEID, isFilterFixed:true };

works when the FILEID is just an ID for a single file. I have tried adding multiple filterValues by repeating the filterValue line of code with different IDs each time and by attempting to make a string including an "or". These have not worked.

Is there another way to filter the searchDialog programatically? Is it documented somewhere or is there an example in the DemoDatabase?

Thanks,

Brian.