[JBoss jBPM] - jbpm-console: conditions not working in jBPM 3.2
by dario.oliveros
Hi,
I've been trying to get the following process definition to work in jBPM 3.2, but had no luck so far. It seems the conditions are simply ignored when going through the process nodes. FYI, I've used the jPDL Designer to create the process project and also to deploy its definition to JBoss AS (packaged with jBPM suite).
Any help is appreciated.
Dário
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2" name="sample">
| <swimlane name="swimlane1">
| <assignment expression="user(ernie)"></assignment>
| </swimlane>
| <start-state name="start1">
| <transition name="" to="task1"></transition>
| </start-state>
| <task-node name="task1">
| <task name="task1" swimlane="swimlane1">
| <controller>
| <variable name="var1" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="t1" to="decision1"></transition>
| </task-node>
| <decision name="decision1">
| <transition name="1" to="end1">
| <condition>#{var1 == '1'}</condition>
| </transition>
| <transition name="2" to="task2">
| <condition>#{var1 == '2'}</condition>
| </transition>
| </decision>
| <end-state name="end1"></end-state>
| <task-node name="task2">
| <task name="task2" swimlane="swimlane1">
| <controller>
| <variable name="var1" access="read"></variable>
| <variable name="var2" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="" to="end1"></transition>
| </task-node>
| </process-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040277#4040277
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040277
19 years
[JBoss Seam] - AJAX4JSF
by JohnEChesher
I reused the AJAX4JSF search page/code from the booking example to build a search page for my application. I decided to make the search EJB session-scoped, so that my search criteria would still be there anytime I came back to the screen. I also wanted to display the "previous" search results whenever I came back to that page, but I wanted to perform a new search, just in case the results would be different searching with the same criteria, but at this new point in time. So, I added a page action in pages.xml. Everything seemed to work fine, but I noticed that whenever I do an AJAX-based search from the screen, it does the search twice, once for the AJAX call and apparently once again for the page action defined in pages.xml. I hadn't thought about it, but a coworker suggested that was behavior he was not expecting, as he thought the AJAX call would be a get rather than a post and that, since the entire page is not rerendered (we tested and it's not), Seam would not execute the page action specified in pages.xml.
I implemented a "workaround" by having my AJAX call invoke a dummy method (does almost nothing), then letting the method specified on the page action do the real work of the search. This seems to provide the functionality I want without doing a redundant search when doing the AJAX-driven search, but we felt this was a pretty odd way to have to implement this functionality. Code snippets are below.
Am I missing something? Is there a more "correct"/elegant way to implement the desired functionality when using Seam and AJAX4JSF together? The less-than-elegant solution I have now works, but I want to ensure I haven't leveraged unintended functionality, which could yield unexpected results or could be disallowed in a future release, or something like that.
Thanks!
Pages.xml:
<page view-id="/secure/institution_search.xhtml" action="#{institutionSearch.prepSearchPage}">
| <navigation from-action="#{institutionSearch.selectInstitution}">
| <rule if-outcome="success">
| <redirect view-id="/secure/gen_stu_fac.xhtml"/>
| </rule>
| </navigation>
| </page>
from the view:
<h:inputText id="searchString" value="#{institutionSearch.searchString}" size="10">
| <a:support event="onkeyup" actionListener="#{institutionSearch.psuedoFindByAllCriteria}" reRender="searchResults" />
| </h:inputText>
and the session bean:
...
| ...
| @Stateful
| @Synchronized(timeout=5000)
| @Name("institutionSearch")
| @Scope(ScopeType.SESSION)
| @Restrict("#{identity.loggedIn}")
| public class InstitutionSearchAction implements InstitutionSearch
| ...
| ...
|
| {
|
| public void prepSearchPage() {
| if ( ! user.getInstitutions().isEmpty()) {
| foundInstitutions = user.getInstitutionList(); //a case where we don't want to do an actual search...
| }
| else {
| if (prevSearchById) {
| findById(); //where real search occurs...
| }
| else {
| findByAllCriteria(); //where real search occurs...
| }
| }
| }
|
|
| public void psuedoFindByAllCriteria()
| {
| // Set to this value, so that the proper search will be executed when the page is rerendered
| prevSearchById = false;
| }
| ...
| ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040275#4040275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040275
19 years
[JBoss jBPM] - Re: Problem using mysql
by jcv
I found my error, but i dont know howto solve it.
The problem is that hibernate is generation this query
| select top ? job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc
|
and MySQL doenst use SELECT TOP.
I've already changed WEB-INF/classes/hibernate.cfg.xml and add
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
|
where else do i need to change it??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040267#4040267
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040267
19 years