Re: [rules-users] [Drools Flow 5.1] Updating a process definition -> Proceed updates running processes

2011-05-11 Thread anton.litvinenko
but definition of "Proceed" seems to contradict that:

"Proceed: The running process instance proceeds as normal, following the
process (definition) as it was defined when the process instance was
started. As a result, the already running instance will proceed as if the
process was never updated. New instances can be started using the updated
process."

I mean, if process definition has a different id then this is a different
process definition and every method that used to start some particular
process based on its id, now needs to be updated to start processes based on
new id -> kinda makes the whole idea pointles, doesn't it? 

And part about version really confuses me then -> it says that "you can use
the version parameter to show when a process is updated" which I interpret
that I can use version to tell Drools that these are two different versions
of process.

Seems like either I am dumb; documentation doesn't explain the real use case
of updating processes or this feature is not really thought through.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Flow-5-1-Updating-a-process-definition-Proceed-updates-running-processes-tp2928103p2930258.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] concatenate 2 dsl rules in dslr

2011-05-11 Thread Esteban Aliverti
One way to do it could be to have something like this in your DSL:

 Kid=Parson(age < 15)
 Adult=Person(age > 21)
OR=or
AND=and

And then, in your drls, you can write this:

rule "r1"
   when
  Adult
  OR
  Kid
   then
  ...
end

Best Regards,





Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/5/11 Saleem Lakhani 

>  Hi,
>
>
>
> How do I combine 2 different dsl statements in dslr.
>
>
>
> Example in dsl I have;
>
>
>
> 1.   Kid=Parson(age < 15)
>
> 2.   Adult=Person(age > 21)
>
>
>
> Can I write like this in dslr:
>
>
>
> Kid or Adult
>
>
>
> saleem
>
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools Flow 5.1] Updating a process definition -> Proceed updates running processes

2011-05-11 Thread Esteban Aliverti
According to the documentation, updating a process means to add a new
version of the process with a different id:
"Actually, you cannot really update a process, you can only deploy a new
version of the process, the old process will still exist. That is because
existing process instances might still need that process definition. So the
new process should have a different id, though the name could be the same,
and you can use the version parameter to show when a process is updated (the
version parameter is just a String and is not validated by the process
framework itself, so you can select your own format for specifying
minor/major updates, etc.)."

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, May 11, 2011 at 1:33 PM, anton.litvinenko <
anton.litvine...@gmail.com> wrote:

> update the process definition in Guvnor (and build new package)
> then process continues with the new definition (I've added simple Action
> node with system out and change string that is written to system out).
>
> I tried to use version parameter in process definition to distinguish
> between old and new definitions, but it doesn't make any difference.
>
> Could someone please comment on that?
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Ruleflow exits before reaching END node?!

2011-05-11 Thread jayadev
After I call ksession.startProcess(processID); I call
ksession.fireAllRules().

It appears that the txm.commit() statement in
SingleSessionCommandService.execute() method which is invoked for
startProcess command somehow leads to removeEventListener(String type,
EvenListener listener) which results in the removal of the
RuleSetNodeInstance callback of first rule group, therefore, workflow exits
at first rule group when fireAllRules is called.

Can someone point me in the right direction here? What am I doing wrong
here? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Ruleflow-exits-before-reaching-END-node-tp2910473p2930097.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] [Drools Flow 5.1] Updating a process definition -> Proceed updates running processes

2011-05-11 Thread anton.litvinenko
Hi!

According to
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-flow/html/ch04.html#d0e1514
Drools Flow is using "Proceed" strategy by default = already running
processes should continue using old process definitions and new processes
will be run according to updated process definition.

In reality it doesn't seem working this way: I am using persistent session
and I have a process with async step. So, whenever a process stops at this
step and I update the process definition in Guvnor (and build new package)
then process continues with the new definition (I've added simple Action
node with system out and change string that is written to system out).

I tried to use version parameter in process definition to distinguish
between old and new definitions, but it doesn't make any difference.

Could someone please comment on that?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Flow-5-1-Updating-a-process-definition-Proceed-updates-running-processes-tp2928103p2928103.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [Drools Flow 5.1] persistence + spring + localTransaction

2011-05-11 Thread anton.litvinenko
Nobody uses Drools Flow with Spring?

According to svn Mark Proctor should be aware why/how this localTransaction
flag is used. Mark could you please comment?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Flow-5-1-persistence-spring-localTransaction-tp2875263p2928070.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] concatenate 2 dsl rules in dslr

2011-05-11 Thread Saleem Lakhani
Hi,

 

How do I combine 2 different dsl statements in dslr.

 

Example in dsl I have;

 

1.   Kid=Parson(age < 15)

2.   Adult=Person(age > 21)

 

Can I write like this in dslr:

 

Kid or Adult

 

saleem

 

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools flow persistence with Oracle, Could not obtain BTM transaction manager instance

2011-05-11 Thread loumimi
I think I found the source of the problem, 
It seems that I don't have enough privileges to recover some oracle
resources when using bitronix

http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisOraclethrowingaXAExceptionduringinitializationofmydatasource%3F

Someone has tried to use another transaction manager else than BTM
TransactionManager ?

thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-flow-persistence-with-Oracle-Could-not-obtain-BTM-transaction-manager-instance-tp2927178p2927615.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools flow persistence with Oracle, Could not obtain BTM transaction manager instance

2011-05-11 Thread loumimi
Hello jschmied,

Thank you for your quick reply,

I have the same configuration like you ! I'm using
drools-persistence-jpa-5.0.1.jar do you use the same version ?

Thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-flow-persistence-with-Oracle-Could-not-obtain-BTM-transaction-manager-instance-tp2927178p2927349.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools flow persistence with Oracle, Could not obtain BTM transaction manager instance

2011-05-11 Thread jschmied
Hi!

It works for me on Oracle.

in persistence.xml:


org.hibernate.ejb.HibernatePersistence
jdbc/processInstanceDS

org.drools.persistence.info.SessionInfo
org.drools.persistence.info.WorkItemInfo
   
org.jbpm.persistence.processinstance.ProcessInstanceInfo

org.jbpm.process.audit.ProcessInstanceLog
org.jbpm.process.audit.NodeInstanceLog
org.jbpm.process.audit.VariableInstanceLog










orm.xml


http://java.sun.com/xml/ns/persistence/orm";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
orm_1_0.xsd"
version="1.0">


select processInstanceInfo.processInstanceId from
ProcessInstanceInfo
processInstanceInfo
  where :type in
elements(processInstanceInfo.eventTypes)
  



Code:

PoolingDataSource ds = new PoolingDataSource();
ds.setUniqueName("jdbc/processInstanceDS");
ds.setMaxPoolSize(3);
ds.setAllowLocalTransactions(true);
ds.setClassName("oracle.jdbc.xa.client.OracleXADataSource");
ds.getDriverProperties().put("user", "drools");
ds.getDriverProperties().put("password", "drools");
ds.getDriverProperties().put("URL",
"jdbc:oracle:thin:@localhost:1521:ewi300");
ds.init();

System.out.println("create EMF");
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
BitronixTransactionManager transactionManager =
TransactionManagerServices.getTransactionManager();

System.out.println("create ENV");
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
transactionManager);
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
UserTransaction ut = transactionManager;

...

juergen

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-flow-persistence-with-Oracle-Could-not-obtain-BTM-transaction-manager-instance-tp2927178p2927282.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools flow persistence with Oracle, Could not obtain BTM transaction manager instance

2011-05-11 Thread loumimi
Hello,

I crated a sample application to test the persistent of drools workflow. I
tried the example given in the documentation using H2 Db, everything works
fine. 
But when I tried to move to Oracle, I have several problems. I resolved the
bug related to entity names when they are longer than 30, but I still have
an other problem with BitronixTransactionManager 

Can you please check if I'm missing some things ?

Here's my stack trace
INFO: schema export complete
May 11, 2011 12:50:14 PM bitronix.tm.BitronixTransactionManager logVersion
INFO: Bitronix Transaction Manager version 1.3.2
May 11, 2011 12:50:14 PM bitronix.tm.Configuration buildServerIdArray
WARNING: cannot get this JVM unique ID. Make sure it is configured and you
only use ASCII characters. Will use IP address instead (unsafe for
production usage!).
May 11, 2011 12:50:14 PM bitronix.tm.Configuration buildServerIdArray
INFO: JVM unique ID: <184.51.16.220>
May 11, 2011 12:50:14 PM bitronix.tm.journal.DiskJournal open
WARNING: active log file is unclean, previous server crash ?
javax.persistence.PersistenceException: [PersistenceUnit:
org.drools.persistence.jpa] Unable to build EntityManagerFactory
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at com.sample.ProcessTest.main(ProcessTest.java:52)
Caused by: org.hibernate.HibernateException: Could not obtain BTM
transaction manager instance
at
org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:50)
at
org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:357)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:47)
... 8 more
Caused by: bitronix.tm.utils.InitializationException: recovery failed,
cannot safely start the transaction manager
at
bitronix.tm.BitronixTransactionManager.(BitronixTransactionManager.java:65)
at
bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:41)
... 13 more
Caused by: bitronix.tm.recovery.RecoveryException: error running recovery on
resource jdbc/CCOD02 (XAER_RMERR)
at 
bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:191)
at bitronix.tm.recovery.Recoverer.run(Recoverer.java:105)
at
bitronix.tm.BitronixTransactionManager.(BitronixTransactionManager.java:49)
... 14 more
Caused by: javax.transaction.xa.XAException
at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:626)
at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:74)
at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:39)
at bitronix.tm.recovery.Recoverer.recover(Recoverer.java:230)
at 
bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:185)
... 16 more
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code =
-2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): 
[../../../src/share/back/util.c:820]


I overwrote the file persistence.xml of drools-persistence-jpa-5.0.1.jar


http://java.sun.com/xml/ns/persistence
 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
 http://java.sun.com/xml/ns/persistence/orm
 http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
  xmlns:orm="http://java.sun.com/xml/ns/persistence/orm";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns="http://java.sun.com/xml/ns/persistence";>

  
org.hibernate.ejb.HibernatePersistence
jdbc/db
org.drools.persistence.session.SessionInfo
   
org.drools.persistence.processinstance.ProcessInstanceInfo 
   
org.drools.persistence.processinstance.ProcessInstanceEventInfo
org.drools.persistence.processinstance.WorkItemInfo

  
  
  
   
  
  
  
  

  

  




The data source is created with API way :
PoolingDataSource ds = new PoolingDataSource();
ds.setUniqueName("jdbc/db"

Re: [rules-users] Guvnor service to compile part of a package ?

2011-05-11 Thread Vincent LEGENDRE


> Category info is not returned at the moment. But this should be a very 
> quick fix, let me see when I can find time. Though the fix will only be 
> available in 5.3.Snapshot.

Ok, but the better is to add a filtered build directly on the server (otherwise 
I will have to listing everything and filter at client side ...)

> https://issues.jboss.org/browse/GUVNOR-1080 is an enchantment to the old 
> REST API, which will be deprecated later. You need to look at the new 
> JAX-RS based REST interface.

Where (in the code) this interface takes place ?
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users