[jBPM Development] - Drools integration
by sebastian.s
Good evening,
I would like to continue the discussion just starting in the JIRA comments of Issue #JBPM-2006 here in the forums. And I would like to encourage a discussion about it. I like Bernd's idea of discussing "best practices" and different ways of integrating.
https://jira.jboss.org/jira/browse/JBPM-2006
For me a real integration would allow the end-user to use the rules repository (Drools Guvnor) but at the same time it would be nice to enable them to use a serialized rule base as well.
As far as I overlook the situation a rule would be used from within a DecisionHandler class or instead of one - depends how you implement this.
One would be in need to specify which rule should be retrieved and be called from the repository. Furthermore you would need to specifiy which variables should be used as input for the rule. Since we are talking about general business rules the result would not necessarily be the name of the transition to take. So you would be in need to map a specific result of the rule evaluation to the name of the transition to take.
Is there anything wrong with my idea of using rules? Which approach would need more effort? The serialzed rule base or the repository approach?
Bye
Sebastian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267703#4267703
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267703
15 years, 1 month
[JBoss AS Development] - Re: Graceful Shutdown
by emuckenhuber
"emuckenhuber" wrote :
| Doing a brief research - in the TomcatService there is a handleNotification, which actually starts and stops the connectors. So the question is if the acceptor interface should also specify a contract for this. Otherwise we could end up opening ports without any user application installed, as this is something MC also does not know about.
That's why i was asking if we need something like a 'acceptor' deployment phase - which is deployed last and undeployed first. So that you can just write your usual MC bean deployment thingy. In the end this is also not something ProfileService knows about, but it controls when deployments are deployed.
It most probably makes more sense to move the responsibility to the "central management bean" and the acceptor interface - where you basically have to decouple the acceptor from the MC lifecycle, or so ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267666#4267666
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267666
15 years, 1 month
[JBoss AS Development] - Re: Graceful Shutdown
by emuckenhuber
"bstansberry(a)jboss.com" wrote : But I want to clarify some re: my understanding of the acceptor and how it ties in to deployment stages.
|
| AIUI, an acceptor is not scoped to a connector. It's scoped to the thing that handles requests for a particular component (a webapp, and EJB). In Tomcat terms, it would be the first thing in the webapp-specific Pipeline that results in a call on the servlet.
Yes that's what's my understanding of an acceptor is as well, but it seems we are talking about different issues :)
AFAIR you briefly looked at the xml profile configuration prototype i did almost a year ago. The concept behind this is that all this sub-profiles are activated (deployed) before we move on to the user 'deploy' folder - to make sure that all deployers are started, installed and registered at the mainDeployer. Additionally you should combine deployer and runtime services into one consistent profile description (incl. the acceptor).
This would also mean that e.g. acceptor.start() will be called before even looking at the user deploy folder.
Doing a brief research - in the TomcatService there is a handleNotification, which actually starts and stops the connectors. So the question is if the acceptor interface should also specify a contract for this. Otherwise we could end up opening ports without any user application installed, as this is something MC also does not know about.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267662#4267662
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267662
15 years, 1 month
[JBoss XML Binding Development] - Element is not bound as a global element.
by thomas.diesler@jboss.com
I have a schema like this
| <xsd:schema xmlns="http://org.jboss.test.osgi.jbossxb.simple"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://org.jboss.test.osgi.jbossxb.simple"
| elementFormDefault="qualified" attributeFormDefault="unqualified"
| version="1.0.0">
|
| <xsd:element name="course-booking" type="courseBooking" />
| <xsd:complexType name="courseBooking">
| <xsd:sequence>
| <xsd:element ref="company" />
| <xsd:element ref="student" minOccurs="1" maxOccurs="unbounded" />
| </xsd:sequence>
| <xsd:attribute name="courseReference" type="xsd:string" use="required" />
| <xsd:attribute name="courseDate" type="xsd:date" use="required" />
| <xsd:attribute name="invoiceReference" type="xsd:string" use="required" />
| <xsd:attribute name="totalPrice" type="xsd:decimal" use="required" />
| </xsd:complexType>
| <xsd:element name="student" type="studentType" />
| <xsd:complexType name="studentType">
| <xsd:attribute name="firstName" type="xsd:string" use="required" />
| <xsd:attribute name="surname" type="xsd:string" use="required" />
| </xsd:complexType>
| <xsd:element name="company" type="companyType" />
| <xsd:complexType name="companyType">
| <xsd:sequence>
| <xsd:element name="address" />
| <xsd:element ref="contact" />
| </xsd:sequence>
| <xsd:attribute name="name" type="xsd:string" />
| </xsd:complexType>
| <xsd:element name="contact" type="contactType" />
| <xsd:complexType name="contactType">
| <xsd:attribute name="name" type="xsd:string" use="required" />
| <xsd:attribute name="telephone" type="xsd:string" use="required" />
| <xsd:attribute name="email" type="xsd:string" use="required" />
| </xsd:complexType>
| </xsd:schema>
|
and an xml like this
| <booking xmlns="http://org.jboss.test.osgi.jbossxb.simple" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <company name="ACME Consulting">
| <address>10 Coyote Avenue, Arizona, USA</address>
| <contact name="Duke" email="duke(a)acme.com" telephone="1234567890" />
| </company>
| <student firstName="Jane" surname="Dow" />
| <student firstName="John" surname="Doe" />
| </booking>
|
using this code
| Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
| unmarshaller.setSchemaValidation(true);
| unmarshaller.setNamespaceAware(true);
| unmarshaller.setValidation(true);
|
| URL xsdurl = getResourceURL("simple/booking.xsd");
| assertNotNull("booking.xsd available", xsdurl);
|
| URL xmlurl = getResourceURL("simple/booking.xml");
| assertNotNull("booking.xml available", xmlurl);
|
| JBossEntityResolver entityResolver = new JBossEntityResolver();
| entityResolver.registerLocalEntity(CourseBooking.NAMESPACE_XML_SIMPLE, xsdurl.toExternalForm());
| unmarshaller.setEntityResolver(entityResolver);
|
| DefaultSchemaResolver schemaBindingResolver = new DefaultSchemaResolver();
| schemaBindingResolver.addClassBinding(CourseBooking.NAMESPACE_XML_SIMPLE, CourseBooking.class);
|
| CourseBooking booking = (CourseBooking)unmarshaller.unmarshal(xmlurl.toExternalForm(), schemaBindingResolver);
| assertNotNull("booking not null", booking);
|
I get
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element {http://org.jboss.test.osgi.jbossxb.simple}booking is not bound as a global element.
| at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:641)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
| at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
|
I debugged into SundayContentHandler and found that SchemaBinding
| public ParticleBinding getElementParticle(QName name)
| {
| return elements.get(name);
| }
|
has element "course-booking" registered instead of "booking"
If I change the schema and xml to use course-booking, all works fine.
Why is "booking' not registered?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267658#4267658
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267658
15 years, 1 month