how to get the pkg from guvnor by KnowledgeAgent?
by ethan
Dear all, I want to deploy pkg from guvnor by KnowledgeAgent. The code like
below:
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(
"MyAgent" );
kagent.applyChangeSet(
ResourceFactory.newUrlResource("http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/test/LATEST...")
);
KnowledgeBase kbase = kagent.getKnowledgeBase();
But I got an error from guvnor:
WARN 19-02 01:02:56,853 (RulesRepositoryManager.java:getRulesRepository:70)
Creating RulesRepository with default username.
=============== session-guest-33
INFO 19-02 01:02:56,856 (DemoAuthenticator.java:authenticate:54) Demo
login for user (null) failed: unsupported username/credential.
WARN 19-02 01:02:56,857 (AuthorizationHeaderChecker.java:loginByHeader:65)
Unable to authenticate for rest api: null
I think the problem is the knowledgeAgent can't authenticate sucessful, but
I don't know how to set the username and password when knowledgeAgent send
request to get pkg. Anybody can help me? Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-get-the-pkg-from-guvnor-by-Knowl...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Garbage collection and sliding windows (Drools 5.5.0 Final)
by tai-atari
Hi everyone,
I'm currently doing some performance tests with Drools Fusion (5.5.0) and
have run into some issues with EventFactHandles which are not being garbage
collected. VisualVM tells me that for every 200k inserted events, about 15k
EventFactHandle objects are still left as live objects.
Current setup:
1) Drools 5.5.0 Final
2) Oracle JVM 1.7.0_06 on Windows 7
3) STREAM mode
4) 1 ksession at startup
5) 1 drl file with
- a single sliding window "over window:time(10s)"
- 1 entry-point
- declared event class as '@role( event )'
- only action being taken as events shows up is a println()
Events are being expired (and removed) properly from the 10 second sliding
window, which is verified by checking the
getFactCount() from the WorkingMemoryEntryPoint. Iterating through all
EventFactHandles also show that isExpired is false on all of them (and the
count is correct). But even though the events are removed from the sliding
window, they do not seem to be available to the GC.
If dispose() is called on the ksession, garbage collection is performed
properly. I get this same behavior with over "window:length" as well. And
even without using sliding windows at all unless I specifically add a
"@expires ( 1s )" to the event class declaration.
Has anyone else seen this behavior? After a couple of million events the
memory consumption becomes a pain and the only recovery action which seems
to be available is to dispose the ksession and start over. This means state
is lost and it requires the application to save and reinsert all facts to
the ksession, then start adding events again.
Any help on how to troubleshoot this further would be really appreciated.
--
View this message in context: http://drools.46999.n3.nabble.com/Garbage-collection-and-sliding-windows-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Re: [rules-users] Drools Guvnor User authentication
by droolist
Verify that you have given that user permissions in the administration
module.
Here is my experience when I tried Guvnor 5.5 with JAAS...
After I got past that namespace issue, I ran into a Seam issue where user
was returning null. After searching, it seemed that was a bug in Seam
security that was included in Guvnor. So, I gave up on trying to use JAAS
and tried the authenticator. If you dont need the callback that JAAS
provides, you have the option of trying Authenticator. If you are using
tomcat, you have put your classes in the WEB-INF/classes folder. when I
tried to jar and put in the lib folder, it didnt pick up the class.
It is possible in your case that you just need to provide the user
permissions.
Hope this helps.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-User-authentication-tp402...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Drools Grid & GridNode
by Charles Moulliard
Hi,
The drools project contains Grid, GridNode interfaces + implementation into
2 different maven modules
- drools-grid-impl &
- drools-spring
but interface definitions are different
Questions:
1) Is it planned to remove interfaces from drools-spring maven module ?
2) Do we need same interfaces into 2 different maven modules (risk of
clash) ?
Regards,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
11 years, 9 months
Dispose Session in Finally Block
by Julian Klein
I was looking at the code for StatelessKnowledgeSessionImpl and
both execute methods dispose of the wrapped StatefulKnowledgeSession. The
calls to dispose however are not in finally blocks. Should they be? If
so, I have a local update for which I can issue a pull request.
Thanks,
Julian
11 years, 9 months
Adding a priority based on enum
by André Fróes
Inside my planning a priority would be considered a soft constraing right?
I created a Enum class with 6 priority going from P1 to P6. How can I add
it to my SimpleScoreCalculator? (the lower the number is, the higher is
the priority)
For example, i have 7 workorders, each one have a requiredWorktime of 8
hours, 3 a P1, 2 P3 and the other 2 P6, and I have 4 available engineers
with 8 hours worktime each one.
At the end, this should be sorted by worktime, skill and priority.
Engineer 1 Skill ABC1, ABC2, ABC3, ABC4
Engineer 2 Skill ABC4, ABC3
Engineer 3 Skill ABC2, ABC3
Engineer 4 Skill ABC1, ABC4
Workorder 1 skill ABC1, ABC2, ABC4, P1
Workorder 2 skill ABC3, ABC4, P1
Workorder 3 skill ABC1, ABC4, P1
Workorder 4 skill ABC4, P3
Workorder 5 skill ABC3, P3
Workorder 6 skill ABC1, ABC2, ABC3, ABC4, P6
Workorder 7 skill ABC1, ABC2, ABC4, P6
at the end, the result should be
Engineer 1 - WorkOrder 1
Engineer 2 - WorkOrder 2
Engineer 4 - WorkOrder 3
Engineer 3 - WorkOrder 4
and the rest of it shouldn't be planned.
How can I manage this? Will I have to do something like that move or treat
it as a hard constraing to?
11 years, 9 months