When you work with folders in FileNet and managing documents within, it can make sense to inherit the security of the folder to the documents that are filed in. For that the “SecurityFolder” property was introduced and could be used on the docuemnts classes. In the next chapter I will guide you how to setup an event action that will automatic set the SecurityFolder property to your documents, so that you can use this for creation update or change actions.
The following JavaScript code is solely provided as a sample without any expressed or implied warranty. It is used to create an asynchronous Event Action that is tied to a Subscription that triggers on the Checkin event or Creation event. When a document is checked in, the script retrieves the list of properties, specifically the FoldersFiledIn property. If there are multiple folders, only the first one is retrieved. It then sets the value of the Security Folder property to the folder retrieved. Messages are also printed to SystemOut.log when the operation succeeds or fails to locate a folder or if it encounters an exception. When the SecurityFolder property is set to a certain folder, any security at the folder level that is set to propagate to childen objects, will propagate to the respective documents with the Source field indicating ‘Inherited’ as opposed to ‘Direct’.
importPackage(java.lang);
importClass(Packages.com.filenet.api.engine.EventActionHandler);
importClass(Packages.com.filenet.api.util.Id);
importPackage(Packages.com.filenet.api.events);
importPackage(Packages.com.filenet.api.property);
importPackage(Packages.com.filenet.api.security);
importPackage(Packages.com.filenet.api.core);
importPackage(Packages.com.filenet.api.constants);
importClass(java.lang.System);
function onEvent(event, subId)
{
try {
var oDoc, oProps, oRCR, oFolders, oFol, iter
oDoc = Factory.Document.fetchInstance(event.getObjectStore(),event.get_SourceObjectId() ,null);
oProps = oDoc.getProperties();
oFolders = oProps.getIndependentObjectSetValue("FoldersFiledIn");
iter = oFolders.iterator();
if (oFolders.isEmpty()) {
System.out.println("Skipped Security Folder Document = " + oProps.getIdValue("ID").toString());
}
else {
oFol= iter.next();
oProps.putObjectValue ("SecurityFolder",oFol);
oDoc.save (RefreshMode.REFRESH);
System.out.println("Set SecurityFolder Document = " + oProps.getIdValue("ID").toString() + " , Folder = " + oFol.get_FolderName());
}
}
catch (e) {
System.out.println("Failed SecurityFolder Document = " + oProps.getIdValue("ID").toString());
throw new RuntimeException(e);
}
}
Go to the Administrative Console for Content Platform Engine and create the new event action.




Now create a subscription to launch the event action whenever a document is checked-in or created in your required document class.






Be sure that the subscription runs asynchronously and the checkin and creation event are selected.

Now we create a new folder to test the security inheritance.


Now we set the required permissions on the folders security tab.

Keep in mind that only permission user/groups are inherited where the apply level is a child level
When you now add a document to the folder you will see that the security of the folder in inherited to the document.




Now you can see the inherited permissions on the documents security tab.

And the SecurityFolder property is set to the folder filed in.

There is certainly a great deal to learn about thistopic. I really like all the points you made.
Im thankful for the post. Really Great.
Very neat blog article.Really thank you! Fantastic.
Great blog article.Thanks Again. Want more.
China Requirement of feed grade zinc oxide.123ブランドコピー代引き
Hmm is anyone else having problems with the pictureson this blog loading? I’m trying to find out if its a problem on myend or if it’s the blog. Any responses would be greatly appreciated.
Thanks for sharing, this is a fantastic article post.Really thank you! Will read on…
Very informative article post.Thanks Again.
Great blog.Thanks Again. Keep writing.
Thanks for sharing, this is a fantastic blog article.Thanks Again. Awesome.
Your style is really unique in comparison to other folks I’ve read stuff from. Thanks for posting when you’ve got the opportunity, Guess I will just book mark this blog.
Thanks a lot for the article.Thanks Again.
Really appreciate you sharing this blog article.
There’s certainly a lot to find out about this topic. I love all the points you have made.
An intriguing discussion is worth comment. I do think that you ought to write more about this topic, it might not be a taboo matter but usually folks don’t discuss these topics. To the next! Best wishes!!
I am so grateful for your blog post.Much thanks again. Want more.
I believe you have observed some very interesting details, thanks for the post.Feel free to visit my blog post Cognifen Review
Very good blog.Thanks Again. Really Great.
Wow, great post.Really thank you!
We are looking for some people that might be interested in from working their home on a part-time basis. If you want to earn $200 a day, and you don’t mind writing some short opinions up, this might be perfect opportunity for you!
I really enjoy the blog post.Really thank you! Really Cool.
Major thanks for the article. Great.
Very neat blog.Really looking forward to read more. Awesome.
WOW just what I was looking for. Came here by searching
for nordvpn coupons inspiresensation special coupon code
plaquenil for rheumatoid arthritis can hydroxychloroquine be purchased over the counter hydroxychloroq
350fairfax nordvpn
This design is wicked! You definitely know how
to keep a reader amused. Between your wit and your videos, I
was almost moved to start my own blog (well, almost…HaHa!) Fantastic job.
I really loved what you had to say, and more than that, how you presented it.
Too cool!
Visit my web blog nord vpn coupon codes
Very neat article. Really Cool.
Great, thanks for sharing this post. Really Great.
I appreciate you sharing this blog post.Thanks Again. Will read on…
Thank you ever so for you article. Really Great.
mail order pharmacy india austria pharmacy online – ez pharmacy
Great, thanks for sharing this article post.Much thanks again.
I appreciate you sharing this blog article.Really looking forward to read more. Cool.
Very informative article.Really looking forward to read more. Cool.