Hell yeah - we always like receiving Community Contributions :)

I had a quick look at the code and it'll probably be more than a couple of days (especially as you'd need to presumably get up to speed too?)

Depending on what meta-data you want there are different steps, but the gist is to expose org.drools.guvnor.client.rpc.MetaData (constructed from an AssetItem, retrieved from the Repository, and normally only sent to the client-side) to the ContentHandlers' compile method. We could use the AssetItem direct, but alot of the meta-data (especially Categories) is more easily accessed if we populate MetaData. ContentHandlers build the various DRL's - these would all need changing too to accept MetaData and (depending on whether the auto-inclusion is enabled) add the Metadata.

Feel free to come along to #guvnor IRC channel for a chat.

You'd probably need to read this too.

With kind regards,

Mike

On 20 March 2012 12:07, <stephen.masters@me.com> wrote:
So you might be up for adding the functionality to the platform if I build it? I don't suppose you have any vague guesses at how long it might take for me to develop this functionality, given that I haven't contributed anything to the project yet? If you reckon it could be just 2 or 3 days effort then it sounds like I should be able to log project time to build it, as it would be valuable to my current client.

Steve


On Mar 19, 2012, at 10:02 PM, Michael Anstis <michael.anstis@gmail.com> wrote:

The "Metadata" under the "Attributes" tab is stored in the JCR repository and does not form part of the KnowledgeBase.

You can add metadata that is part of the KnowledgeBase using using the "Show options" at the bottom of the Guided Rule Editor and adding metadata.

This metadata appears in rules as (for example) @mymetadata and AFAIK is part of the rule metadata accessible from the droolsjbpm-knowledge API.

Unfortunately there is no way to link the two; however it is a reasonably simple requirement and I'll happily mentor you to help with a Pull Request.

With kind regards,

Mike

On 19 March 2012 17:30, Stephen Masters <stephen.masters@me.com> wrote:
Hi folks,

I'm curious about what metadata should be on a rule when created in Guvnor. I was assuming that any of the metadata fields shown under the "Attributes" tab should be available as metadata items when the rule gets activated. i.e. Title, categories, Created date, etc...

However, when I call event.getActivation().getRule().getMetaData() on an AfterActivationFiredEvent, the map returned is completely empty.

Or is the "metadata" for a rule in Guvnor not the same thing? I was rather hoping to be able to take note of the categories of each rule that fires.

fyi ... I'm using 5.3.0.Final.

Thanks for any assistance you can provide.

Steve

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users