Page 2 of 3

Re: Unable to create property group

PostPosted:Mon Jul 19, 2010 4:13 pm
by pavila
If you want to modify a property group definition, yon only can add more element but not remove or modify them once registered.

Re: Unable to create property group

PostPosted:Tue Jul 20, 2010 9:59 am
by randomagenda
Hi everyone,

I have finally managed to get the property groups working with the option's I wanted. :D Thank you to all who helped, I have decided to write a quick guide to how I achieved this for anyone who may come across the same issue/s.

1) If you have already created a property group you CANNOT modify it, so if you are having problems start from scratch.

2) When adding the PropertyGroups.xml finle I still got the error message 'Missing = in namespace decl. (CustomNodes.cnd, line 1)' however the property groups seem to work perfectly. the error message is not important (as far as I can see)

3) In the main directory of your OKM installation you should find PropertyGoups.cnd and PropertyGoups.xml, I modified these files and then added them through the administrator console.

4) Make sure your files are 100% correct, no Capital letters or or missing characters. If you get it wrong you'll probably have to start all over again with a new installation!

5) If you are having difficulty check you can use the demo PropertyGroups files to create your property groups, they can be found here: http://wiki.openkm.com/index.php/Proper ... definition

Below I have included the actual working PropertyGroups files I have used to get the options working as I needed.
(714 Bytes) Downloaded 301 times

Hope this helps anyone having the same trouble, and also a BIG thank you to all who gave advice.

Random Agenda

Re: Unable to create property group

PostPosted:Sun Aug 08, 2010 5:55 pm
by missg
Hi there,
finally i can managed to setup property group as i want it to be, but cant even to change the filenames (means i have to continue to use demo file name and certain parameter i cannot change e.g language or comment from demo .xml) but that's ok as long as i can see my settings. One other things, can i attach property group on a folder? if so, what should i do and if not, is there any chance to implement on version 5.0? currently i'm using version 4.1.
I need to move lots of paper to openkm, and it is hard to put property group on each files.

rgds,
-dewo-

Re: Unable to create property group

PostPosted:Mon Aug 09, 2010 2:40 pm
by jllort
Seems you've got registered the property group and you want to change it ... what you want to change ? from ... to ... ? It's not possible to drop a metadata var

Re: Unable to create property group

PostPosted:Mon Aug 09, 2010 3:49 pm
by missg
Let's say if i create new instance of okm, rather than to attach property group to a single file is there any chance to attach to a folder and applied to everything inside it? just like the security role menu?
At this time being, my dms is working well even if i have to put the property group one by one.

rgds,
-dewo-

Re: Unable to create property group

PostPosted:Tue Aug 10, 2010 9:39 am
by jllort
If I understand well you want to set the property group in folder to assign every document into no ? and don't losing time putting to each document by separate, it's that ?

Re: Unable to create property group

PostPosted:Thu Aug 12, 2010 7:22 am
by missg
yes...that what i'm talking about :D , is it possible?

Re: Unable to create property group

PostPosted:Thu Aug 12, 2010 11:41 am
by jllort
At version 5.0 could be done, really repository is prepared for it. But needs some extra changes in search engine.

Re: Unable to create property group

PostPosted:Sat Aug 14, 2010 5:17 am
by missg
I really appreciate it. it would be helpful if you can figure out to attach property group on folders. looking forward to it.

rgds,
-dewo-

Re: Unable to create property group

PostPosted:Mon Aug 16, 2010 11:58 am
by jllort
I'll add in our roadmap, but I don't know when it'll be done, all pending roadmap features has priority level depending if are community or our client demands, if was a client demand sure in new version it'll be available, but as I said I'm not sure it'll be available. Client sponsorizes in same way it, hope you could understand it.

Re: Unable to create property group

PostPosted:Wed Aug 25, 2010 9:00 am
by PedroKowalski
I've achieved auto-assigning property groups to documents within particular folder by using the scripts (http://wiki.openkm.com/index.php/Scripting) or by modyfing the code itself (and therefore built my own, modified OpenKM).

However, I am definitely more interested in modyfing or removing the property groups. It's most unfriendly to have to check the syntax 10 times and knowing that if you submit the propertyGroups, you cannot change them ever. Frankly, it's most annoying thing I've bumped into in OpenKM at this point. Are there any chances that this will be changed in 5.0 release?

If I understand it correctly, the property groups are in fact nodes in JCR, co are there really no way to delete them? Even connecting straight to the Jackrabbit?

Thanks in advance for reply.

Re: Unable to create property group

PostPosted:Thu Aug 26, 2010 8:29 am
by jllort
Hi PedroKowaiski,

First, if you've changed the source code we can not ensure all is right, because we don't know what you've modified and in which way.

About property groups, the answers is yes, are jcr nodes. The problem really is that for historical reasons in DMS might not be deleted the properties, that's the reason why we don't allows it. Althought can be deleted values into properties ( extended or limited ), but not the nodes, that could be shown as a limitation, but at the same way can be a feature, really the only case when it's acceptable deleting a property is because you've made some error on creation. Really, property could be dropped by some migration process.

You can add more properties, but can not change or delete.

If you explain better your problem, for what you're using and the problem you've got, probably we could help you better.

Re: Unable to create property group

PostPosted:Thu Aug 26, 2010 10:55 am
by PedroKowalski
Thanks for quick reply jllort.

@missg,jllort:
If it comes to auto-assigning property groups I guess you can achieve the same using Scripting and code which looks something similiar to this:
Code: Select all
String sessionToken = es.git.openkm.core.SessionManager.getInstance().getTokenByUserId(session.getUserID()); 
String path = eventNode.getPath(); 
String propertyGroup = "okg:writing2"; 

es.git.openkm.module.PropertyGroupModule cm = es.git.openkm.module.ModuleManager.getPropertyGroupModule(); 
cm.addGroup(sessionToken, path, propertyGroup);
You could also create a map directory=>propertyGroup, if you would like to add specific propertyGroup to particular directory.

@jllort:

I've defined the propertyGroup in file and deployed it (registered). I've then noticed that the name of a property in *.cnd file is mispelled and wanted to rename it, and then I end with an error that non-trivial changes like name-changes are not supported. Therefore I'm left with wrongly named property till the end...

I'm terrified what happens if I would add this file on the production server at the first place and there would be some mistake in the code. I am not able even to validate it before adding... Or If I would like to add some propertyGroup at this point and perhaps remove it if they'll not be valid anymore for my purpose - it's also impossible.

Is this an limitation of JCR / Jackrabbit or the OpenKM? Can I connect to the repository with some kind of "JCR explorer" and remove these nodes by hand?

Thanks in advance for your reply.

Re: Unable to create property group

PostPosted:Fri Aug 27, 2010 8:22 am
by jllort
It's a jackrabbit restriction, can not be changed repository structure on fly.

I don't see problem on script. You've got problem on every document that has assigned the property or only on someones ?

Can you use: es.git.openkm.api.OKMProperty.getInstance().addGroup( ?

Re: Unable to create property group

PostPosted:Fri Aug 27, 2010 2:35 pm
by PedroKowalski
To be precise - this code I've posted is not my concern - it is just a possible solution for user "missg", who wanted to set some propertyGroup to all documents uploaded to specific folder.

My concern is the JackRabbit limitation about changing the repository structure...

Do you have some process, advices how to test / validate the *.cnd file before uploading in order to prevent errors occurence during the properties registration?