Drools Workbench - Roles & Customization

729 views
Skip to first unread message

Jebuselwyn Martin

unread,
Apr 8, 2015, 2:49:24 AM4/8/15
to drools...@googlegroups.com
Hi,

Is there a document covering the current roles & the action mapping for the Drools workbench? I couldnt find it online.

For eg: if I want to restrict 'build & deploy' for certain roles, how to enable it.


The other question is on customization:
What are the customization or extension points available in Drools WB - 6.2.0.Final 

- Is there provision to show only few links (or rather deep-linking of Drools WB into custom-application) - this will also need SSO enablement from the parent-app.
- Is there an option to selectively handle certain drools-wb actions - for e.g: during 'build & deploy' i want to trigger a jbpm (or activiti) human-task (or any custom action) so that the rules can be deployed only after approval?
- Lastly is there an option to re-skin the workbench?

All these questions are driven by the application needs to inherit selective (nice) features from drools-wb (like Guided Rule Editor, Guided DTables)

Thanks,
Jebu.

Jebuselwyn Martin

unread,
Apr 8, 2015, 3:33:15 AM4/8/15
to drools...@googlegroups.com
For the first part of the question, found partial answers from the user guide.. Still would be good to get clarity.

Below roles when assigned to user are not allowing user to be logged-in if below roles are the only roles for the user. i.e if 'developer' role it the only role assigned to user, i'm getting the 'Not authroized' error message. But if we have the user with developer,analyst role, it allows me to login (with analyst role only). Is there a configuration to be tweaked?  I'm using drools-wb-6.2.0.Final.

Admin/Analyst roles are working fine (independently).

developer - Not Authorized (Login as another user)
manager - Not Authorized (Login as another user)
user - Not Authorized (Login as another user)

Michael Anstis

unread,
Apr 8, 2015, 5:54:26 AM4/8/15
to drools...@googlegroups.com
Hi,

The extent of roles->action mapping can be found here. It's a little cryptic but should be understandable.

Users able to login to the workbench should, AFAIK, need at least one role defined in web.xml.

> Is there provision to show only few links (or rather deep-linking of Drools WB into custom-application) - this will also need SSO enablement from the parent-app.

If you want to completely customize the workbench you can add/remove dependencies in the pom as needed. If you want to embed a single editor in your web-app you can look into "standalone" mode (see the User Guide).
 
> Is there an option to selectively handle certain drools-wb actions - for e.g: during 'build & deploy' i want to trigger a jbpm (or activiti) human-task (or any custom action) so that the rules can be deployed only after approval?

At the moment we support workflow for a sub-set of tasks (see Asset Management in the User Guide). You can replace the processes with your own if required.

> Lastly is there an option to re-skin the workbench?

No, or at least not easily.. the "Header" banner can be easily changed, but this isn't full skinning.

If you have some specifics please feel free to ask.

With kind regards,

Mike



--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/bdc3dbac-7563-44ed-853e-96996b88fcec%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jebuselwyn Martin

unread,
Apr 8, 2015, 2:21:14 PM4/8/15
to drools...@googlegroups.com
Fantastic!!  Thanks for detailed clarifications Mike.

Jebuselwyn Martin

unread,
Sep 23, 2015, 2:34:11 AM9/23/15
to Drools Setup
Hi,
Is there a way to clone existing (git)repositories as 'Managed repository' in Drools WB?

Also how to trigger a custom action for the 'Build & Deploy' button? Do we need to bundle or place some jars in classpath or is there some API available to interface with external applications?

The usecase for above is, the kie-scanner usage within application is not feasible due to the huge bloat of dependencies and guava dependency issue. So we're trying to have our own custom code which needs to be triggered when the user clicks 'Build & deploy' from Drools WB which can then load the jar as a classpath jar and  rebuild the KB.

Thanks,
Jebu.

Michael Anstis

unread,
Sep 23, 2015, 3:13:51 AM9/23/15
to drools...@googlegroups.com
As for whether it's possible to clone an existing repository as managed.. I don't think so (but wait for those BCC'ed to correct me).. please raise a GUVNOR JIRA for future consideration.

@Walter, @Salaboy, @Toni.. anybody know?

As for the other of your enquire;  there's the notion of "post build helper" that we use to deploy KJARs to the jBPM runtime (in kie-wb) following "Build & Deploy".

See here for out usage. Implementations are injected so you should be able to write your own implementation and have it run after "Build & Deploy"...

If you want to remove the "out of the box" Build & Deploy functionality you could:-

1) Rename PostBuildHelper to BuildOperation (for example)

2) Add a sequence number to allow BuildOperations to be sequenced.

3) Move the current B&D functionality to a BuildOperation.

4) Hell.. even split the current B&D into two BuildOperations: one B the other D.

5) Move the current PostBuildHelper implementations to BuildOperation implementations sequenced to run after the primary B&D.

6) Submit a PR with your lovely changes so the wider community can enjoy :)


With kind regards,

Mike


Jebuselwyn Martin

unread,
Oct 21, 2015, 1:58:37 PM10/21/15
to Drools Setup
Thanks Michael. The postBuildHelpers, can these be injected via properties? or does this have to be updating the kie-common-wb codebase?

I'm looking at a way to not touch the kie-common-wb code, yet have a external hook-point merely as a runtime configuration. 

Thanks,
Jebu.

On Wednesday, April 8, 2015 at 12:19:24 PM UTC+5:30, Jebuselwyn Martin wrote:

Michael Anstis

unread,
Oct 21, 2015, 2:12:01 PM10/21/15
to drools...@googlegroups.com
Only injection with CDI at the moment.

Feel free to provide Pull Requests for additional mechanisms to register them!

Provided a kie-wb dependency contains a "CDI discoverable(*)" PostBuildHelper implementation the class can be anywhere - not just in kie-wb-common etc.

e.g. a JAR with a beans.xml file in it and @ApplicationScoped implementation.
  

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages