Well first off, if you use the content organizer within a web under normal conditions, you
must not read any further.
If you want to do a lot around content organizer and manipulate data from begin to end,
Giving a list of pitfalls would be going too far, but there are a couple of issues that I do want to mention:
1. Timer job issues:
a. One of the issues that we encountered was that a drop off library list event handler wouldn’t fire if the documents were routed via a timer job. One for one pushing of the documents to the sub site drop off folder wasn’t an issue. But a timer job push disabled the event receiver.
b. Large files: when a push happens, the entire file is being copied first (if you go reflecting in the dll’s you’ll see that 2 streams are being set up). A final check happens if the entire file is copied correctly. Only problem was, to counter the first issue with the event handler we had to put the parsing logic into a workflow. Only problem , while the copying process is done, the workflow already kicked in. This in result returned a “this item is already changed” error. So the check to see if the file is copied correctly failed only with large files. Small files never gave an issue.
As a result a doubling effect happened, the file was put in the drop off library of the sub site but also stayed in the root web drop off folder (the delete event of the source file never happened). Took us almost an hour to see where the problem was 🙂
2. Creating content rules automatically
a. An issue was, don’t fill the “Automatic Folder Creation” field via code, this is a read only field and will be filled in automatically (however I’m not a 100% sure this is the case, if I’m wrong, please leave me a note and I’ll change it)
b. Also the “condition” part proved to be quite challenging
In fact the field says that it is a multiline of text, but if you take a good look, it only saves the column name, not the condition nor the value.
After doing a lot of reflecting I’ve learned a great deal of SharePoint internals and learned a bunch of objects that I’ve never used before. One dll you should really look at is the system.office.policy.dll file J .
At the moment I still don’t understand in depth what happens with the condition field (only thing I know that SP converts it into an xml structure, but where, what is being saved, still not sure).
The rest of the fields are pretty self-explaining and can easily be filled with data, make one rule via gui and see what the structure is.
3. Creating the connection via code (instead of the central admin) -> in one of my previous blog posts I dedicate an entire blog to it
4. An additional problem that came up last minutes.
In the drop off library I always checked with site collection admin rights. But it seems that If you don’t have these permission setting, you don’t get to see the files. This has something to do with a bug in SP. It’s setting the items to unique permissions so that a site owner can’t see all the
files in the drop off library. This ofcourse will be problematic. A solution for this one? I’m still looking into it and I’ll come back to you on that one in my later blogs.
That’s about it, these are my lessons learned (and still learning) concerning content organizer feature use in a not standard environment.
If you have a standard environment, please let me know, you would be the first one 🙂