[JBoss jBPM] - Finding next task after join?
by pietermartin
Hi,
I am trying to programatically find the next tasks to display to the user as buttons while he is busy on any particular task.
I get this right with normal transitions to tasks and forks but do not know how to do this when the transition is to a join. I would then need to find out whether the join is only waiting for the current task in which case I will display the task after the join to the user otherwise I need to display the tasks that the join is still waiting for to the user.
Is this possible?
Basically the idea is to generate the transitions as buttons on the form for the user and start the next task for the user and display the web page for that task.
Currently I am doing the following to get the next task when a fork is involved.
| List<Transition> leavingTransisitons = taskInstance.getAvailableTransitions();
| if (leavingTransisitons.size()!=1) {
| throw new IllegalStateException("Task may only have one leaving transition!");
| }
| Transition leavingTransition = leavingTransisitons.get(0);
| log.info("leavingTransition = #0 ", leavingTransition.getName());
|
| Node node = leavingTransition.getTo();
| if (node.getName().startsWith("fork")) {
| log.info("leavingTransistion.getTo() = #0 ", node.getName());
| List<Transition> forkLeavingTrans = node.getLeavingTransitions();
| for (Transition forkTransition : forkLeavingTrans) {
| log.info("forkTransition #0 ", forkTransition.getName());
| transitionTasks.add(new TransitionTask(leavingTransition.getName(),forkTransition.getTo().getName(),forkTransition.getTo().getName()));
| }
| } else if (node.getName().startsWith("join")) {
| log.info("leavingTransistion.getTo() = #0 ", node.getName());
| }
|
I know that the hardcoding of task names as 'join' or 'fork' is ugly but with the javassist I do not know how else to tell the type of the nodes.
Any help pointers appreciated.
I am using jbpm-3.2.2 with seam-2.0.0.GA
Cheers
Pieter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111514#4111514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111514
18 years, 4 months
[JBoss Seam] - Recommendation: Filter, Servlet or tag
by marius.oancea
Hello,
I have a field read from db that contains some HTML and I have to display this field. The HTML contans things like : "..... ...". All images are in a db table with 3 fields:
id - e.g. ./MyImages/img1.jpg
mimetype
data (blob)
I see 3 ways to implement this:
- create a Filter that find all such img tags in the page and recognize the images starting with ./MyImages. The filter stores the images in the GraphicImageStore and replace the URL with the seam url to retrive the image from store.
- make a servlet mapped to "MyImages". Servlet will access the dao to retrieve the data from db.
- create a tag similar to seamtext that receive a text and make all the necesarry steps (parse, store imgs in ImageStore, replace the IMG tags with calls to the img store).
Any other
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111513#4111513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111513
18 years, 4 months
[JBoss Seam] - Re: Seam Email - IllegalStateException: No Factories configu
by beligum
Hi Pete,
As this may be true, I'm still having troubles with UseJBossWebLoader=false and JSF, eg when using RichFaces' Tree and adviseNodeOpened, throwing this exception:
| 06:11:09,568 ERROR [STDERR] Dec 10, 2007 6:11:09 AM com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/app/tumbolia/pages/home.xhtml]
| javax.faces.el.MethodNotFoundException: /app/tumbolia/panels/main/space/showSpace.xhtml @197,65 adviseNodeOpened="#{fileSystemManager.adviseFileSystemTreeNodeOpened}": Method not found: FileSystemManagerImpl:3j011-viq6zi-fa0jfyhc-1-fa0jr7br-1c.adviseFileSystemTreeNodeOpened(org.richfaces.component.UITree)
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:71)
| at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement$1.adviseNodeOpened(TreeRendererBase.java:312)
| at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.processAdvisors(TreeRendererBase.java:329)
| at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:241)
| at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:132)
| at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:280)
| at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:393)
| at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:428)
| at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:318)
| at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:59)
| at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:302)
| at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:365)
| at org.richfaces.component.UITree.walk(UITree.java:323)
| at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:682)
| at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:625)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276)
| at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
| at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
|
I don't have this when using UseJBossWebLoader=true, but I'm unable to use my Asynchronous Mail system then, so I'm in some sort of deadlock ;-)
Any suggestions?
b.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111506#4111506
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111506
18 years, 4 months
[Installation, Configuration & DEPLOYMENT] - Configuring Jboss + Apache HTTPD + tomcat
by sbarreros
Hello,
after 2 days of trying multiple things I finally have decided to seek for expert advice from you guys.
Here is my scenerio, I have Apache2, jboss4.2.2, and tomcat 5 all running on the same linux server and I need to have them work all together which they were to a certain extent.
We recently installed a php application to our apache server and that is when things started to get a but much for me.
The problem is that I need to have diferent directories respond to different applications.
For example
www.mydomain.com/mail goes to the stand alone tomcat
www.mydomain.com/customapp goes to my php application
www.mydomain.com goes to my Jboss server
www.mydomain.com/jbossapp goes to my jboss server
Let me show you my configuration files first.
This is my modjk configuration file for apache
===============================================
LoadModule jk_module /usr/lib/apache2/mod_jk.so
JkWorkersFile /etc/apache2/conf.d/workers.properties
#JkShmFile /var/log/apache2/mod_jk.shm
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkLogLevel debug
JkMount /* jboss
JkMount /mail/* tomcat
This is my workers.properties file
==============================================
worker.list=tomcat,jboss
worker.jboss.port=8009
worker.jboss.host=localhost
worker.jboss.type=ajp13
worker.jboss.lbfactor=1
worker.tomcat.port=8008
worker.tomcat.host=localhost
worker.tomcat.type=ajp13
worker.tomcat.lbfactor=1
And this is the configuration for the PHP application
==============================================
<IfModule mod_alias.c>
Alias /customapp /home/apps/apache/www/customapp
<IfModule sapi_apache2.c>
<Directory /home/apps/apache/www/customapp>
Options -Indexes -FollowSymLinks +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
php_value session.save_handler user
php_value max_execution_time 300
AddDefaultCharset ISO-8859-1
php_value register_globals 1
<Directory /home/apps/apache/www/customapp/bin>
Order deny,allow
Deny from all
The problem with Jboss is that if I set JkMount /* jboss in my configurations it will respond for the path that my php application should be responding. And the response is one of those generic Jboss errors directory not found.
I know I am mounting Jboss to respond to anything when I set it like that.
But first, if I set something like JkMount /jmx-console/* jboss I get an error message from the apache server and in my modjk log I get this error message
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (500)]: Attempting to map URI '/jmx-console'
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (500)]: Attempting to map URI '/jmx-console'
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (500)]: Attempting to map URI '/error/HTTP_NOT_FOUND.html.var'
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Sun Dec 09 23:06:09 2007] [jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker
when I had only the jboss server and the tomcat server running simultaniously I had no problem mounting jboss as JkMount /* but now that I need the php application I can't mount it like that.
-First, why when I set JkMount /jmx-console/* jboss it does not work?
Only when I set it as JkMount /* jboss I can access the jmx console
Once I get the issue above resolved,
-How do I get my application to be the root application for my domain?
Like I mentioned before I was accomplishing this by setting JkMount /* but I can't do that any more....
Sorry I know it is a lot to digest, but I am pulling my hair out trying to make this work
Any help is greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111504#4111504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111504
18 years, 4 months