[Microcontainer] - annotation plugin - mismatch
by obrien
Hi, I'm trying to solve this problem for last two days. Following example in BeanContainerInjectionTestCase.xml and the ALR's example at http://is.gd/cV5p I want to add my custom annotation plugin.
In spite of all this, it seems like it doesn't use the correct metadata annotation adapter. My deployment looks like
<bean name="plugin1" class="net.laststation.mc.annotation.integration.FillNameAnnotationPlugin"
| error-handling="DISCARD" access-mode="ALL">
| <property name="adapter"><inject bean="BMDAdapter"/></property>
| </bean>
|
| <bean name="BMDAdapter" class="org.jboss.kernel.plugins.annotations.AbstractMetaDataAnnotationAdapter" access-mode="ALL">
| <incallback method="addAnnotationPlugin"/>
| <uncallback method="removeAnnotationPlugin"/>
| </bean>
|
| <bean name="library" class="net.laststation.mc.annotation.model.Library" access-mode="ALL"/>
|
and I can see, the plugin being created, addAnnotationPlugin is called and plugin added to fieldAnnotationPlugins Set. But using IntelliJ ability to mark object I can see adaptor used to add plugin and the one handle annotation is different.
Any idea what I'm doing wrong? So far I haven't tried to debug AdapterLookup, so that's the last option I've got.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209616#4209616
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209616
17 years, 4 months
[Beginners Corner] - [JBoss Rules/Drools] - Mathematical formula implementation
by ybh6336
Hello all,
I could not find a specific forum for Drools, so posting it here, please point me to it if there is one. I need an opinion from the Drools users/developers for a business problem.
We have a requirement in which the end users would create mathematical "formulae" through a UI. So in a single transaction, a user could create a formula, apply it on the transactional data, and save the formula for future use. The operands in a formula would be attributes of certain objects, and the operators could potentially go beyond just simple algebraic operators. An example could look like this:
| if (object.country == "USA")
| then output = (object.normalRate * (@someConstant + #someUserInput)) / object.quantity
| else output = (object.exciseRate * @someConstant) / object.quantity
|
The "decision-making" behavior of the formula inclines me towards using some rules engine like JBoss Rules/Drools. Does anyone here know if JBoss Rules or any other rules engine would fit for a requirement like this, where rules could be created dynamically through a UI and then saved (file or database) or users could select a rule among several available ones?
I would really appreciate any feedback.
Thanks,
Yogesh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209604#4209604
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209604
17 years, 4 months
[JBoss jBPM] - Multiple actions within an event
by richiethom
Hi,
My business analyst has designed a process whereby I have the following in the process definition:
| <state name="syntax-validation">
| <event type="node-enter">
| <action name="High Level Syntax Validation" class="com.myproject.HighLevelSyntaxValidationAction" />
| <action name="Detailed Syntax Validation" class="com.myproject.DetailedSyntaxValidation"/>
| </event>
| <transition to="final-validation" name="passed">
| <action name="Persist Entity" class="com.myproject.PersistEntityAction"></action>
| </transition>
| <transition to="entity-rejected" name="rejected"></transition>
| </state>
|
How do two actions decide between them where to transition to?
My guess is that the first action either specifies a transition (ie the entity being persisted has failed its high level validation) or doesn't specify one at all - effectively falling through - in which case the entity has passed its high level validation and the detailed validation should decided on the transition, but this doesn't seem to work.
Does anyone have any pointers to examples or somewhere in the documentation that would cover this?
Cheers
Rich
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209601#4209601
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209601
17 years, 4 months