Compatability between Eclipse jBPM5 5.5 Editor and Designer 2.4?
by kawest173713
I had implemented a process in Designer 2.4 (thru Guvnor), using the Workflow
pattern "Arbitrary Cycle" that is provided out of the box with the designer.
Basically just created a new process within Designer, then placed the
Arbitrary Cycle pattern into the process, and saved it - without making any
changes to it. I was able import it into Eclipse (Kepler) and bring it up
from within Eclipse with no issues.
Because the out of the box Arbitrary Cycle pattern had validation errors, I
went back into Designer to fix all the validation errors and modify the
tasks, which included:
- made all the tasks script tasks
- Changed all of the paths out of the XOR gateways to have a "50%"
probability
- added a start and end event
- added a flow out of task E to the end event
- added a flow out of G to the end event
- created a png of the process
I then selected the validate process button, and everything validated fine.
Switching back to Eclipse, I imported the process using the File -> New ->
Resources From Guvnor.
When I then tried to bring the process up in Eclipse, I got the following
popup error:
An exception occurred while reading the Ruleflow XML: this type of node
cannot have more than one incoming connection!
In the Eclipse log for the worspace, it had the following exception:
java.lang.IllegalArgumentException: This type of node cannot have more than
one incoming connection!
at
org.jbpm.workflow.core.node.EndNode.validateAddIncomingConnection(EndNode.java:59)
at
org.jbpm.workflow.core.impl.NodeImpl.addIncomingConnection(NodeImpl.java:100)
at
org.jbpm.workflow.core.impl.ConnectionImpl.connect(ConnectionImpl.java:76)
at
org.jbpm.workflow.core.impl.ConnectionImpl.<init>(ConnectionImpl.java:71)
at
org.jbpm.bpmn2.xml.ProcessHandler.linkConnections(ProcessHandler.java:293)
at org.jbpm.bpmn2.xml.ProcessHandler.end(ProcessHandler.java:145)
at
org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:422)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown
Source)
...
Given this, it seems to me that the designer is creating processes that the
Eclipse editor is unable to parse/render. Is this expected behavior - i.e.
is the designer a superset of the Eclipse editor capabilities?
If so, what capabilities are in Designer that aren't supported in the
Eclipse editor - if such a list exists? I just don't want to spend much time
implementing in the Designer if I never know what will/won't import to
Eclipse.
Thanks,
Keith
--
View this message in context: http://drools.46999.n3.nabble.com/Compatability-between-Eclipse-jBPM5-5-5...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 7 months
DSL statement in Guvnor too long
by Sean Su
Does anyone know if we can force the DSL statement in Guvnor to be
displayed with multiple lines when it is too long to fit into one screen. I
believe the default behavior is that it keeps expanding with the horizontal
scroll bar, instead of wrapping to fit the screen.
Thanks
Sean
12 years, 7 months
Expected Transaction Rollback Behavior of Drools 6
by Alexander Herwix
Hey guys,
I have a question regarding the expected transaction rollback behavior of drools 6 in an JTA-Environment. It looks like I have successfully configured drools within my app, however when I create a KieSession within a Transaction and roll it back, there is still some data persisted to the DB.
e.g. session info (the last record should be rolled back)
ID LAST_MODIFICATION_DATE RULES_BYTE_ARRAY START_DATE OPTLOCK
1 2013-09-05 20:22:48.363 aced000577500a060805100418005246080010001a3c18002000320608011000180042231a190a044d41494e10001801200028ffffffffffffffffff01400022060a044d41494e52090a0744454641554c5422026800 2013-09-05 20:22:47.485 1
2 2013-09-05 20:22:48.624 aced000577500a060805100418005246080010001a3c18002000320608011000180042231a190a044d41494e10001801200028ffffffffffffffffff01400022060a044d41494e52090a0744454641554c5422026800 2013-09-05 20:22:48.615 1
3 2013-09-05 20:24:18.346 aced000577500a060805100418005246080010001a3c18002000320608011000180042231a190a044d41494e10001801200028ffffffffffffffffff01400022060a044d41494e52090a0744454641554c5422026800 2013-09-05 20:24:18.334 1
4 2013-09-05 20:26:31.309 aced000577500a060805100418005246080010001a3c18002000320608011000180042231a190a044d41494e10001801200028ffffffffffffffffff01400022060a044d41494e52090a0744454641554c5422026800 2013-09-05 20:26:31.301 1
5 2013-09-05 20:26:31.347 aced000577500a060805100418005246080010001a3c18002000320608011000180042231a190a044d41494e10001801200028ffffffffffffffffff01400022060a044d41494e52090a0744454641554c5422026800 2013-09-05 20:26:31.337 1
6 null aced0005775e0a060805100418005254080010001a4a18002000320608011000180042231a190a044d41494e10001801200028ffffffffffffffffff01400022060a044d41494e52090a0744454641554c545a0c0a0a0805320608001000180122026800 2013-09-05 20:36:01.164 0
similar for process instances started in those sessions
INSTANCE_ID LAST_MODIFICATION_DATE LAST_READ_DATE PROCESS_ID PROCESS_INSTANCE_BYTE_ARRAY START_DATE STATE OPTLOCK
1 2013-09-05 20:22:48.45 2013-09-05 20:22:47.91 com.sample.ruleflow aced00057a0000015f000852756c65466c6f770a060805100418004ab401080012486f72672e64726f6f6c732e636f72652e6d61727368616c6c696e672e696d706c2e53657269616c697a61626c65506c616365686f6c6465725265736f6c76657253747261746567791a66aced0005737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000577040000000a7400057465737433740005746573743274000a536f6d65537472696e67740004746573747400057465737434785293010a0852756c65466c6f7710011a13636f6d2e73616d706c652e72756c65666c6f77200128033a0e08021004220608011a0208012801420b0a016610001a0400000000420b0a016d10001a0400000001420b0a017810001a0400000002420b0a017910001a0400000003420b0a017a10001a040000000460006a01316a013572050a0131100172050a0134100172050a01351001 2013-09-05 20:22:47.901 1 1
2 2013-09-05 20:22:48.626 2013-09-05 20:22:48.623 com.sample.ruleflow aced00057a0000015f000852756c65466c6f770a060805100418004ab401080012486f72672e64726f6f6c732e636f72652e6d61727368616c6c696e672e696d706c2e53657269616c697a61626c65506c616365686f6c6465725265736f6c76657253747261746567791a66aced0005737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000577040000000a7400057465737433740005746573743274000a536f6d65537472696e67740004746573747400057465737434785293010a0852756c65466c6f7710021a13636f6d2e73616d706c652e72756c65666c6f77200128033a0e08021004220608011a0208022801420b0a016610001a0400000000420b0a016d10001a0400000001420b0a017810001a0400000002420b0a017910001a0400000003420b0a017a10001a040000000460006a01316a013572050a0131100172050a0134100172050a01351001 2013-09-05 20:22:48.622 1 1
3 2013-09-05 20:24:18.348 2013-09-05 20:24:18.344 com.sample.ruleflow aced00057a0000015f000852756c65466c6f770a060805100418004ab401080012486f72672e64726f6f6c732e636f72652e6d61727368616c6c696e672e696d706c2e53657269616c697a61626c65506c616365686f6c6465725265736f6c76657253747261746567791a66aced0005737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000577040000000a7400057465737433740005746573743274000a536f6d65537472696e67740004746573747400057465737434785293010a0852756c65466c6f7710031a13636f6d2e73616d706c652e72756c65666c6f77200128033a0e08021004220608011a0208032801420b0a016610001a0400000000420b0a016d10001a0400000001420b0a017810001a0400000002420b0a017910001a0400000003420b0a017a10001a040000000460006a01316a013572050a0131100172050a0134100172050a01351001 2013-09-05 20:24:18.343 1 1
4 2013-09-05 20:26:31.31 2013-09-05 20:26:31.308 com.sample.ruleflow aced00057a0000015f000852756c65466c6f770a060805100418004ab401080012486f72672e64726f6f6c732e636f72652e6d61727368616c6c696e672e696d706c2e53657269616c697a61626c65506c616365686f6c6465725265736f6c76657253747261746567791a66aced0005737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000577040000000a7400057465737433740005746573743274000a536f6d65537472696e67740004746573747400057465737434785293010a0852756c65466c6f7710041a13636f6d2e73616d706c652e72756c65666c6f77200128033a0e08021004220608011a0208042801420b0a016610001a0400000000420b0a016d10001a0400000001420b0a017810001a0400000002420b0a017910001a0400000003420b0a017a10001a040000000460006a01316a013572050a0131100172050a0134100172050a01351001 2013-09-05 20:26:31.307 1 1
5 2013-09-05 20:26:31.348 2013-09-05 20:26:31.346 com.sample.ruleflow aced00057a0000015f000852756c65466c6f770a060805100418004ab401080012486f72672e64726f6f6c732e636f72652e6d61727368616c6c696e672e696d706c2e53657269616c697a61626c65506c616365686f6c6465725265736f6c76657253747261746567791a66aced0005737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000577040000000a7400057465737433740005746573743274000a536f6d65537472696e67740004746573747400057465737434785293010a0852756c65466c6f7710051a13636f6d2e73616d706c652e72756c65666c6f77200128033a0e08021004220608011a0208052801420b0a016610001a0400000000420b0a016d10001a0400000001420b0a017810001a0400000002420b0a017910001a0400000003420b0a017a10001a040000000460006a01316a013572050a0131100172050a0134100172050a01351001 2013-09-05 20:26:31.345 1 1
6 null null com.sample.ruleflow null 2013-09-05 20:36:01.168 0 0
Does anyone know if this the expected behavior of drools or if this might indicate some problems with my configuration? There are no errors thrown.
Thanks for any help in advance :)
Cheers, Alex
12 years, 7 months
Drools 6 Spring JTA Persistence
by Alexander Herwix
Hey guys,
I'm working on a Grails plugin for Drools/Jbpm 6 and I have trouble to get persistence working in a user friendly way. It would be awesome if someone with a better understanding of drools and especially drools spring integration could help me to figure this out :)
I have considered multiple approaches:
- Use a spring LocalContainerEntityManagerFactoryBean with a local JpaTransactionManager to configure a KieEnvironment via Spring.
I basically got this working, but this doesn't provide real integration with Grails, as there are 2 seperate local TransactionManagers involved - limiting the ability to integrate drools in the grails app.
- Use JTA-Transactions.
As I want the plugin to be as user friendly as possible I would like to keep using the default tomcat container for development. There is the Atomikos Plugin for Grails which configures Grails to work with JTA. This works pretty nicely and should suffice for the development environment.
My problem is integrating the Atomikos backed JTATransactionManager with the drools 6 spring environment configuration as I have not much experience with JTA. I have looked at the Tests for Kie-Spring and looked at as much documentation as I could find, but I can't seem to figure this out.
This is what I use to configure the environment via spring (in Grails groovy syntax)
jbpmGlobals(MapGlobalResolver)
dacceptor(ClassObjectMarshallingStrategyAcceptor,['*.*'])
kie.kstore(id:'kiestore')
kie.environment(id: 'jbpmEnv'){
kie.'entity-manager-factory'(ref:'entityManagerFactory')
kie.globals(ref:'jbpmGlobals')
kie.'object-marshalling-strategies'(){
kie.'jpa-placeholder-resolver-strategy'()
kie.'serializable-placeholder-resolver-strategy'('strategy-acceptor-ref':"dacceptor")
}
}
//Tried to wrap my JtaTransactionManager with KieSpringTransactionManager
jbpmTransactionManager(KieSpringTransactionManager, ref('transactionManager'))
the environment value for transactionManager cannot be set here, because the parser expects a JpaTransactionManager. I tried to add the transactionManager manually to the environment and found the KieSpringTransactionManager, which looked like it could help me somehow, but in the end, there is always the default implementation of the JtaTransactionManager used which can't find the transactionManager that I configured.
Error:
NamingException occurred when processing request: [GET] /bpm/test/testJbpm
Cannot create resource instance. Stacktrace follows:
javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.drools.persistence.jta.JtaTransactionManager.findUserTransaction(JtaTransactionManager.java:122)
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:69)
at org.drools.persistence.SingleSessionCommandService.initTransactionManager(SingleSessionCommandService.java:325)
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:114)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:129)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:67)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:36)
at bpm.TestController.testJbpm(TestController.groovy:119)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
I would be glad about any input.
Cheers, Alex
12 years, 7 months
Re: [rules-users] Fully qualified name for generated classes
by Lance Leverich
The issue isn't that Foo cannot be resolved, as it was imported into both
packages from the Global Area. The packages compile just fine. I believe
what might be happening, though, is that each package is creating its own
version of Foo.
For example, am I experiencing something like...
com.mypkg.a generates a class with a fully qualified name of
drools.com.mypkg.a.Foo
com.mypkg.b generates a class with a fully qualified name of
drools.com.mypkg.b.Foo
?
If this is the case, is there someway within Guvnor to refer to a
particular version? I'm beginning to think that my best option might be to
create a POJO and import it. At least that way, I can make sure I know the
fully qualified (i.e. canonical) class name.
~ Lance
Cc:
> Date: Wed, 4 Sep 2013 15:41:55 +0100
> Subject: Re: [rules-users] Fully qualified name for generated classes
> Guvnor's Global Area has no affect on fully qualified type names; it's
> just a container for things you want to share.
>
> If Foo could not be resolved in myRuleB the rule would fail to compile.
>
> What do you observations show if you don't have any rule flow?
>
>
> On 4 September 2013 15:28, Lance Leverich <lance.leverich(a)gmail.com>wrote:
>
>> What would be the fully qualified name for a generated class, that is
>> based upon a fact type (for example a type named "Foo") that is defined
>> inside a declarative model?
>> How is the fully qualified name affected if the model resides in the
>> Global Area, and is imported into multiple packages?
>>
>> The reason for my question is that I have the following issue:
>>
>> In the Global Area, I have a declarative model (named MyModel) with a
>> definition like...
>> declare Foo
>> bar: String
>> version: String
>> end
>>
>> In a package (com.mypkg.a), I have imported MyModel from the Global Area.
>> I have a rule like...
>>
>> rule "myRuleA"
>> ruleflow-group "firstGroup"
>> when
>> not Foo( bar=="bar" )
>> then
>> Foo fact = new Foo();
>> fact.setBar("bar");
>> fact.setVersion("1");
>> insert(fact);
>>
>> In another package (com.mypkg.b), I have also imported MyModel from the
>> Global Area. I have a rule like
>>
>> rule "myRuleB"
>> ruleflow-group "secondGroup"
>> when
>> Foo()
>> then
>> System.out.println("got at least one Foo");
>>
>> Looking at logs, the rule myRuleA fires as is appropriate; however, the
>> rule myRuleB does not fire, even though both ruleflow groups are
>> represented in the ruleflow. I have verified that both of the ruleflow
>> groups are activated, using the logs. My best guess at this point is that
>> the class generated for fact type Foo is different for each package. So,
>> how can I make sure that I am instantiating and checking for the same type
>> across packages?
>>
>>
>>
>> Lance Leverich
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
12 years, 7 months