Drools BPMN 2.0 service task error for process edited using Oryx
by Patricia Bogoevici
Hi all,
I am using Drools 5.1 release, and I am testing the BPMN process definition created with Oryx designer. The main problem I ran into is the serviceTask element. I cannot open the process file created with Oryx designer, in Eclipse, as it complains about this error:
"java.lang.IllegalArgumentException: No interfaces found at org.drools.bpmn2.legacy.beta1.ServiceTaskHandler.handleNode(ServiceTaskHandler.java:35)"
Below is a snippet from the BPMN 2.0 xml file got using Oryx for serviceTask. I also attached the whole xml file, in case that help.
I appreciate a lot if someone can help me with this issue, as I am practically stuck at this point.
On the other hand, I noticed that Drools Eclipse workflow editor allows only for 2 types of service tasks: Email and Log. Is that a limitation of the Eclipse workflow editor, or the serviceTask is not implemented in Drools BPMN 2.0?
Can I use serviceTask BPMN 2.0 element in Drools workflow?
****** serviceTask from Oryx process ******
<serviceTask implementation="webService" completionQuantity="1" startQuantity="1" isForCompensation="false" name="AH Web Service" id="oryx_B84C15D7-ADA6-4956-8C43-3DFD02967BE1"/>
Thanks in advance,
Patricia
14 years, 3 months
Matching items based on values in lists
by cortlander
I am new to drools and have been struggling with this rule.
$subject: RqTargetType contains a list of RqAttrib objects
$resource: RqTargetType also contains its own list of RqAttrib objects
$subject in a certain role has to be selected based on (attribType ==
"subject", designator == "subject.role", attribValue == "patient")
$subjectId is to be extracted from another attribute (attribType ==
"subject", designator == "subject.id", $subjectId: attribValue)
We then need to select a resource that has an attribute to match this
$subjectId (attribType == "resource", designator == "resource.patient",
attribValue == $subjectId )
Here is the rule I wrote:
rule "Patient Access Rule"
#conditions
RqTargetType( $subjectAttribs : rqAttribs )
RqAttrib (attribType == "subject", designator == "subject.role",
attribValue == "patient") from $subjectAttribs
RqAttrib (attribType == "subject", designator == "subject.id",
$subjectId: attribValue) from $subjectAttribs
$resource: RqTargetType( )
RqAttrib (attribType == "resource", designator == "resource.patient",
attribValue == $subjectId ) from $resource.getRqAttribs()
RqAttribute (attribType == "resource", designator == "resource.id",
$resourceId: attribValue ) from $resource.getRqAttribs
then
#actions
System.out.println( "resource: " + $resourceId );
System.out.println( "subject: " + $subjectId );
System.out.println( "Patient Access rule decision: Permit" );
decisions.add("Permit");
retract($subject);
end
I keep on getting "no viable alternative at input" error.
Tried stripping the code so that only the following was left and still got
the error:
RqTargetType( $subjectAttribs : rqAttribs )
RqAttrib (attribType == "subject", designator == "subject.role",
attribValue == "patient") from $subjectAttribs
[ERR 101] Line 25:2 no viable alternative at input 'RqTargetType' in rule
"Patient Access Rule"
Then tried this with similar results.
$subject: RqTargetType()
$subjectAttrib: RqAttrib (attribType == "subject", designator ==
"subject.role",
attribValue == "patient") from $subject.getRqAttribs()
no viable alternative at input '$subject' in rule "Patient Access Rule"
Any help will be much appreciated.
Thank you and have a great day.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Matching-items-based-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 3 months
Drools Rule language resources Reg;
by Murali Venugopal
Hi,
I'm a newbie to Drools and Rules. I see this Mailing list provides lot
of valuable information regarding Drools.
Actually I'm looking for some good resources which helps in writing
Rules. I.e Rule Syntax and Semantics. It's since 3 months I have started
showing interest in Drools. But still I can't proceed more than the
examples given in the books, which is not sufficient to work on real
time projects.
I'm referring books like
1. Drools JBoss Rules 5.0
2. JBoss Drools Business Rules
also,
1. Drools documentation and Manuals.
But still there's no definitive guides for writing rules. The Drools
Documentation has listed all the possible keywords. But, their Syntax
and Semantics are missing.
I went through this entire Mailing List hoping someone would have asked
this question before me. But in vain.
So, please refer/point me some good resources for Rules. Because in
Drools, I believe, everything is possible only through Rules.
Thanks and Regards,
Get your world in your inbox!
Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id!
Log on to http://www.sify.com
********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin(a)sifycorp.com
14 years, 3 months
Re: [rules-users] functions inside fact type declaration?
by Greg Barton
+1 on the full constructor.
GreG
On Aug 9, 2010, at 3:58 PM, Edson Tirelli <tirelli(a)post.com> wrote:
I thought about adding that, but I feel like we would just be reimplementing java, in this case. So, if you need anything else other than simple java beans, you should implement it as a java class.
Regarding the constructor, I might still add a constructor that receives all fields as parameters, just to reduce verbosity when using the java dialect, but if you are using mvel dialect, you can use "with":
rule ...
when ...
then
with( person = new Person() ) {
name = "Bob",
age = 35
}
insert( person );
end
Edson
2010/8/9 Tina Vießmann <tviessmann(a)stud.hs-bremen.de>
Hi,
is it possible to define a function/constructor inside a fact type
declaration? If yes, how can it be done?
Thank you :)
Tina
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 3 months
Meaning of the metadata 'key'
by Tina Vießmann
Hi,
I think I'm to stupid to google, but I can't find an explanation what
'@key' means.
Can anyone please explain it to me or just give me a link?
Sorry for the simple and stupid request and thank you for your help!
Greetings
Tina
14 years, 3 months
Help needed in Rule flow in Guvnor
by Vignesh
Hi,
I am using Rule flow in Guvnor for setting some value out of the flow which
would be used for my further processing. Below is what I'm trying to
achieve,
I have two rule groups in the rule flow, out of which the first one would
set a <key, value> pair in a Map which is a field in one of the bean class
declared Global for the package when ever each rule is executed in the set
of rules in the group and the next rule group would be required to have a
set of rules that needs to be executed against this Map which was set in the
first rules group and send the final result as output out of the flow.
I have defined the rules in the first rule group and set the Map with
necessary keys and values, but I was not able to read the Map in this second
rule group. I had tried this second rule group as a custom java code in my
Java part after the rules execution from guvnor and able to read the map
that was set from the first rule group and able set the final decision.
I want to know whether reading the Map from the second rule group which was
set in the first rule group is possible or not. Or kindly let me know
whether I'm missing anything here and needed to add any other logic to
achieve the same.
Thanks,
Vignesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Help-needed-in-Rule-f...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 3 months
Getting NullPointer Exception while sending an response back from Guvnor using web services
by Vignesh
Hi,
I have defined a set of rules using DSL and corresponding rules in Guvnor
and i have tested the same using a standalone code which is working fine.
But when i tried invoking the same from a webservice by including this
guvnor project as a JAR Im getting a NullPointerException while sending the
response back from Guvnor to the web service client,
below is the exception stack i got in server side,
ERROR - AxisServlet.doPost(172) |
java.lang.NullPointerException
at
org.apache.axis2.clustering.context.DefaultContextManager.updateContexts(DefaultContextManager.java:81)
at
org.apache.axis2.clustering.context.Replicator.replicate(Replicator.java:81)
at
org.apache.axis2.receivers.AbstractMessageReceiver.replicateState(AbstractMessageReceiver.java:71)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:41)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)
and the below is the exception stack in client side,
org.apache.axis2.AxisFault: java.lang.NullPointerException
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.tempuri.Service1Stub.CheckEntitlement(Service1Stub.java:740)
at ws.client.testClient.main(testClient.java:73)
If any one has faced similar issue and fixed the same, please help me out it
resolving the same or any pointers for fixing this issue would be of great
helpful.
Thanks,
Vignesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Getting-NullPointer-E...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 3 months
Missing Drools Pipeline
by Thorsten
Hello out there,
I just installed the Drools 5.1 final and have read the updated
documentation of Expert and Fusion. I wonder what happend to the
Pipeline-classes? It seems like they are no longer inside the packages.
Do you have more information?
Thanks and regards
Thorsten
14 years, 3 months