|
Re: SearchProcessingService with PipeletConfiguration [message #632445 is a reply to message #631941] |
Wed, 13 October 2010 00:34 |
UNI-HI Stud Messages: 6 Registered: August 2010 Location: Germany |
Junior Member |
|
|
While some further work i have decided to switch from SearchProcessingServices to Pipelets, because with this approach the user can make invocation- and process-specific Configuration. The Pipelets are using in turn the DeclarativeServices (before SearchProcessingServices) to get some global instances and configurations. But for some reasons I still want to use SearchProcessingServices for some kinds of work. After looking up the functionality of the blackboard service I have stumbled about the GlobalNotes. I think the GlobalNotes would solve some communication-problems between the Pipelets and SearchProcessingServices.
But nevertheless I don't understand why ProcessingServices can't be configured like it's possible with Pipelets. I don't mean Configuration which has to be set at instantiation time, I mean Configurations while processing → A simple attribute/value configuration option.
One example of what I mean:
example.bpel:
<extensionActivity name="invokeLuceneSearchService">
<proc:invokeService>
<proc:service name="LuceneSearchService" />
<proc:variables input="request" output="request" />
<proc:setProperties>
<prop: n="actual_pipeline">testPipeline</prop:prop>
<prop: n="in_which_line_was_i_invoked">100</prop:prop>
</proc:setProperties>
</proc:invokeService>
</extensionActivity>
(Search)ProcessingService:
public SearchMessage process(Blackboard blackboard, SearchMessage message, Properties configprops) throws ProcessingException {
configprops.getProperty("actual_pipeline");
configprops.getProperty("in_which_line_was_i_invoked");
return null;
}
UNI-HI Stud
[Updated on: Wed, 13 October 2010 00:38] Report message to a moderator
|
|
|
|
Re: SearchProcessingService with PipeletConfiguration [message #632974 is a reply to message #631941] |
Thu, 14 October 2010 20:54 |
UNI-HI Stud Messages: 6 Registered: August 2010 Location: Germany |
Junior Member |
|
|
Hmm, after reading up my posts i would say that i have described that what i mean a little bit wrong. Nevertheless you are absolutly right and i have found one problem of the way i was thinking. --> Thanks for that and your reply at all!
But: Setting Annotations is a little bit "complicated" (umständlich) when i just want to make generell configurations (for the Proc.Service) which has nothing to do with the Records.
Quote: | I don't mean Configuration which has to be set at instantiation time, I mean Configurations while processing → A simple attribute/value configuration option.
|
"processing" was wrong discribed, i'm sorry :/ I mean somethin like that:
I have -lets say- 10 RuleBases who are instantiated when my Proc.Service/DeclarativeService is activated. My Problem is now: i don't know which RuleBase the consumer wants to use in the actual processing Pipeline. Yes, i could globaly configure my DeclarativeService so that he always has to use RuleBase1 when Pipeline1 is processing, but thats not what i want! I will, that in one Pipeline more than one RuleBase can be used.
I just need a "static" Properties-instance which is allways send to the process-Method when the Proc.Service is invoked.
Quote: | public SearchMessage process(Blackboard blackboard, SearchMessage message, Properties configprops) throws ProcessingException {
configprops.getProperty("actual_pipeline");
configprops.getProperty("in_which_line_was_i_invoked");
return null;
}
|
Actually it's allready possible by using Pipelets which set GlobalNotes:
1.1) invokePipelet (ConfigPropertie: _useRulebase = "now use RuleBase1")
1.2) set GlobalNote in processing Method of the Pipelet:
blackbaord.setGlobalNote("rulebase",_useRulebase)
2.1) invokeService
2.2) get GlobalNote in processing Method of the Proc.Service:
String use_rb = blackbaord.getGlobalNote("rulebase")
if(use_rb == "now use RuleBase1"){
useRuleBase(1);
} else if (use_rb == "now use RuleBase2"){
useRuleBase(2);
} else ....
3.1) invokePipelet (ConfigPropertie: _useRulebase = "now use RuleBase96")
3.2) set GlobalNote in processing Method of the Pipelet:
blackbaord.setGlobalNote("rulebase",_useRulebase)
4.1) invokeService
4.2) get GlobalNote in processing Method of the Proc.Service:
String use_rb = blackbaord.getGlobalNote("rulebase")
if(use_rb == "now use RuleBase1"){
useRuleBase(1);
} else if (use_rb == "now use RuleBase2"){
useRuleBase(2);
} else ....
So from my point of view, this ping pong game between senseless Pipelet invocations and Proc.Service invocations can't be the only possibility for my Problem! And adding to each record an annotation is also senseless for this (my opinion).
---> Actually i simply let the DelarativeServices running in Background (outside of SMILA) and the Pipelets include the logic and reffer to memory-intensive instances (e.g. a KnowledgeBase/RuleBase)
Prost,
UNI-HI Stud
[Updated on: Thu, 14 October 2010 21:01] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02265 seconds