[JBoss Seam] - Dynamic creation of JBPM processes
by chawax
Hi,
I need to start a JBPM process, but in some cases I can't use the @CreateProcess annotation since the process I need to start depends on an runtime value. I also need to outject variables to the business process. But I can't find how to do this ...
What I did :
- I injected businessProcess component in my class :
@org.jboss.seam.annotations.In(create = true)
| protected org.jboss.seam.bpm.BusinessProcess businessProcess;
- I used @Out annotation to outject the variables in my business process :
@org.jboss.seam.annotations.Out(required = false, scope = org.jboss.seam.ScopeType.BUSINESS_PROCESS)
| protected java.lang.Long idDemandeAbsence;
|
| @org.jboss.seam.annotations.Out(required = false, scope = org.jboss.seam.ScopeType.BUSINESS_PROCESS)
| protected java.lang.String codeMotifAbsence;
- Then I set these variables and call BusinessProcess.createProcess method :
protected void handleValider() throws java.lang.Exception {
| this.idDemandeAbsence = this.demandeAbsence.getId();
| this.codeMotifAbsence = this.ligneDemandeAbsence.getMotif();
| this.businessProcess.createProcess("validationDemandeAbsence");
| }
It looks like the business process starts, but the outjection of variables in the business process does not seem to work ... What I understand is that the outjection is made by Seam after the handleValider() method is called. But the business process starts on the createProcess() method call, so it looks obvious that variables have not been injected yet ...
Any idea how I should do this ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109748#4109748
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109748
17 years, 1 month
[JBossCache] - Re: ClusteredCacheLoader + LOCAL CacheMode
by lovelyliatroim
Yep both sets of code snippets work. No replication being done.
Super stuff Brian, thanks alot.
anonymous wrote :
| From your description, it sounds like you might want to use LOCAL cache mode and a TCPCacheLoader. Have you looked into that?
|
I have read about it but the thing that i dont want is that when you add an entry into one of the nodes, it will replicate the entry straight away into the cache loader(I assume,i havent played with it yet,maybe you can turn this off). I only want to replicate data on demand, i.e if someone asks for data on a node and it aint there, ask the others in the cluster first if they have,if not then got to source. if i add an entry in a node i dont want to push it somewhere else, it just sits on that node until someone else asks for it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109744#4109744
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109744
17 years, 1 month
[JBoss Seam] - Quartz callback persist issue
by maniappan
Hi,
I have moved my seam application to 2.0 and to Quartz from the EJB timer. After that I am seeing that new records are not getting persisted in database from inside the callback object. Update of records seems to be fine. I tried with some tables that do not have any relationships with other tables and it persists the object for those tables. However if I try that in table which has some relationship to another table, EntityHome persist of the parent table fails giving exception as below:
| 2007-12-03 14:55:26,913 ERROR [DefaultQuartzScheduler_Worker-2] util.LoggerStream (LoggerStream.java:152) - javax.persistence.TransactionRequiredException: no transaction is in progress
| 2007-12-03 14:55:26,913 DEBUG [http-192.168.1.6-8443-2] seam.Component (Component.java:1966) - instantiating Seam component: org.jboss.seam.core.events
| 2007-12-03 14:55:26,914 ERROR [DefaultQuartzScheduler_Worker-2] util.LoggerStream (LoggerStream.java:152) - at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:293)
| 2007-12-03 14:55:26,914 DEBUG [http-192.168.1.6-8443-2] seam.Component (Component.java:1387) - initializing new instance of: org.jboss.seam.core.events
| 2007-12-03 14:55:26,914 ERROR [DefaultQuartzScheduler_Worker-2] util.LoggerStream (LoggerStream.java:152) - at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:90)
| 2007-12-03 14:55:26,914 DEBUG [http-192.168.1.6-8443-2] seam.Component (Component.java:1404) - done initializing: org.jboss.seam.core.events
| 2007-12-03 14:55:26,914 ERROR [DefaultQuartzScheduler_Worker-2] util.LoggerStream (LoggerStream.java:152) - at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:51)
|
Anybody faced this before?, any suggestions on how I can debug this further and fix?
This used to work fine when using the EJB based timer. Unfortunately I can't go back to EJB timer since the call back is not all working with my application which was fine even with 2.0CR1 and hence wanted to move to quartz.
-- Mani.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109740#4109740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109740
17 years, 1 month
[JBoss Seam] - Nested conversation - same Persistence Context?
by MSchmidke
Seam 2.0 GA
I became very accustomed to manually flushed persistence contexts as suggested in chapter 8.3.3.
Now, for the first time, I want to use a nested conversation.
I have one page for editing an object. This page is conversation scoped with flushMode=MANUAL.
Now I want to write a second page on which some further detail may be edited. For this subpage I want to use a nested conversation context.
The idea is when the user cancels the subpage, on the edit page everything should be like before opening the subpage, and when the user cancels the edit page, no changes should be written into DB.
But it seems that the subpage has the same persistence context as the edit page (the parent conversation context). This is not good, because every change the user makes in the subpage is immediately visible to the parent page.
Am I doing something wrong? Is there any solution for this?
Marcus.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109735#4109735
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109735
17 years, 1 month