1 2 Previous Next 16 Replies Latest reply on Oct 24, 2005 11:36 AM by Ronald van Kuijk

    Upload/Download File with jBPM Webapp

    Gerhard Wittwer Newbie

      Hello

      A requirement for the webapplication I'm developing with/on jBPM 3.0 is the possibility to upload/download a file at a task-node to the database (default HSQLDB).

      Is there a possibility to define this upload/download controll directly in the processdefinition or do I have to implement an action class?
      If I have to implement an action class, how could I change the GUI of the current task and add a textfield and button (FileUpload / FileDownload Action)?

      Do you have a sample, how I could do this?

      Regards
      Gerhard

        • 1. Re: Upload/Download File with jBPM Webapp
          Ronald van Kuijk Master

          With the current webapp this is not possible. It is limited in functionality. I'm changing it now (don't know if Tom will accept the changes yet) to make it possible to configure in the jsp how the processvariable should be handled. Kind of like

          <h:inputCalender value="#{taskBean.formParameter['<variable-name>']}"/ >
          


          I'm lobbying to get the type of the variable back in the processdefinition. This makes rendering complex pages kind of automatic with the right input types. A type of "file" would be an addition, imo a justified one. Please file a Jira issue for this.

          Ok this is the future. Currently, you have to build your own ui, backingbean etc... sorry for that.


          • 2. Re: Upload/Download File with jBPM Webapp
            Ronald van Kuijk Master

            now I come to think of it. A file is probably relevant in a process, but not as a variable in the process engine. The ui (not necesarrily the jbpm default ui) should be able to handle file uploads, store the file somewhere and put a reference to the file in the process. Maybe not even that if there is already a handle to e.g. a dossier.

            If we'd were to support files, we have to support blobs and those are not so portable across rdbms as you'd hope they were. So it could be that this rfe will not be implemented and if it were, certainly not with a high priority.

            • 3. Re: Upload/Download File with jBPM Webapp
              Gerhard Wittwer Newbie

              Thank you for the input!
              That's true, that blobs are handled different by the rdbms's. I think, I will do an implementation for HSQLDB (if I have time).
              Can I use the org.jbpm.file.def.FileDefinition to store/get a file in/from HSQLDB or should I implement my own class and create my own table in db to do this?
              Do you some Input/Samples on web how to handle this in a J2EE Webapp (if not, google will help me for sure :-)

              Regards
              Gerhard

              • 4. Re: Upload/Download File with jBPM Webapp
                Ronald van Kuijk Master

                input/sample: http://myfaces.apache.org/tomahawk/fileUpload.html

                If you want the file in jBPM if myself do not have a clue (yet) since I do not know the internals of that part of jBPM. Maybe Tom has an idea. If it is not required to have the file in jBPM (which does not mean that you cannot store a reference to it in jBPM, just not the file itself) then I would do it externally. Maybe JSR-170 can help

                • 5. Re: Upload/Download File with jBPM Webapp
                  Keith Davis Newbie

                  This is probably of no help to you, but I did this exact type operation with jBpm 1.0.1, which I am still using. I created an 'OLD' style html formatter to handle placing a file upload tag in the dynamic form. The files were placed on the filesystem, not the DB. The filename was stored in a process variable. As the attachement was passed to each actor in the flow, one could preview the file and/or save it to their system.

                  I would be great if Tom would accept this functionality into the current version (I went through all of this once and that is why I am still using 1.0.1).

                  Regards,

                  Keith R. Davis
                  Mutiny Bay Software

                  • 6. Re: Upload/Download File with jBPM Webapp
                    David Sanchez Novice

                    I would certainly like file upload functionality.

                    • 7. Re: Upload/Download File with jBPM Webapp
                      David Sanchez Novice

                      Doesn't JBoss Portal have the ability to upload a file? Have they figured out a way to deal with the different ways databases deal with a "blob?"

                      • 8. Re: Upload/Download File with jBPM Webapp
                        Ronald van Kuijk Master

                        The way Keith describes it is how I would currently do it. Create your own custom jsp page, with a file upload. Store the file somewhere and update the processvariable.

                        It is not difficult at all. The reason the default application will not support this out of the box shortly is because GOOD file storage on something else then a filesystem (because of clustering) requires either blobs in a db or something like JSR-170. The latter requires database configs which can be complicated. So unless someone cares to contribute on this part. It will not be very high on the todo list.

                        • 9. Re: Upload/Download File with jBPM Webapp
                          Neal Price Newbie

                          I had implemented document upload and storage for JBPM 1.0.1 using Apache slide. The URL to the stored location would be updated within a variable in JBPM. Since JBoss portal also uses Apache slide this should become pretty straightforward if JBPM group develops JBPM portlets for JBoss Portal.

                          Users of JBPM can log into their portal and upload files into their area using the CMS portlet. It would then be possible to search for them from within a task interface and attach them to the current process.

                          I was really disappointed to see that JBPM 3.0 does not have as rich a web app as JBPM 1.0.1. It is not possible to define variable types in the process xml file and have the webapp automatically show the associated rendering for that variable type. I will have to implement all of this again for JBPM 3.0. This has a been a big deterrent for me to move over to JBPM 3.0 and am sure that many others would share my concerns. I expect most people will want to have a fairly mature user interface(web) to use any BPM tool since most of the tasks require user interaction. I speak from experience since I am a developer for a very mature commercial BPM solution. I discovered JBPM 1.0.1 about a year back and was very impressed with the implementation and have been following it ever since.

                          By the way - Any plans to integrate with http://pentaho.org for business process monitoring and reporting. They use JBoss portal. They already have a workfolw engine(Shark) but it should be possible to also use JBPM tables for reporting and monitoring.

                          -Neal

                          • 10. Re: Upload/Download File with jBPM Webapp
                            Keith Davis Newbie

                            I agree with Neal, I put a lot of work into jBpm 1.0.1 and was disappointed when the features that had drawn me to it in the first place went by the wayside (dynamic form implementation). For the near future I will continue with my "fork" of JBpm as the effort required to upgrade my interfaces and definitions is not yet worth the benefits.

                            I still think that jBpm is a great BPM implementation! I hope things will settle down enough for the product to mature as Neal suggests.

                            -Keith

                            • 11. Re: Upload/Download File with jBPM Webapp
                              Ronald van Kuijk Master

                              hmm... you thought the dynamic form implementation in jBPM 1.0 was good? The flexibility in the new forms is much greater. with only a small disadvantage that the variable type is not defined. Please wait for the upcomming week where new enhancements to the ui framework will be checked in. (search other posts or look in the jira for the functionality)

                              • 12. Re: Upload/Download File with jBPM Webapp
                                Keith Davis Newbie

                                Maybe I should have stated my case more clearly, I put a lot of work into the original forms model. I created dozens of custom inputs with validators, file upload, actor re-assignment, etc. Version 1.0 was hardly out and stable when 2.0 was released and quickly followed by 3.0. It just left my head spinning a bit. I wasn't sure where the product was going next and decided to keep using the old version until the feature set and BPM language implementations settle down.

                                I was also disturbed to read an article in the most recent Eweek about JBoss as a whole. I don't have all the details, but the lawsuits brought by JBoss have me a bit worried about using it to build my products.

                                "Ahh Rudy say it isn't so..."

                                -Keith

                                • 13. Re: Upload/Download File with jBPM Webapp
                                  Koen Aers Master

                                   

                                  I was also disturbed to read an article in the most recent Eweek about JBoss as a whole. I don't have all the details, but the lawsuits brought by JBoss have me a bit worried about using it to build my products.


                                  Why should you be worried? First, there has not been any lawsuit. Read Sacha's statement on his blog on this issue (http://jboss.org/jbossBlog/blog/slabourey/2005/10/12/Clarification_on_JBoss_and_partnership_program.txt). And secondly, if you stick to the terms of the LGPL license there is no problem at all. Would all these major telecom companies and banks embedding and using JBoss software be wrong? Would all the Linux users be wrong? I don't think so... But hey, I am a JBoss employee of course ;-)

                                  As for your other point. The quick evolution you are talking about is of course driven by our knowledge of the problem domain that is evolving. We want to be able to offer the best of breed product in the end and sometimes this requires a redesign and breaking API's. Sorry about that, but I am afraid this is at all unavoidable in software development...

                                  Regards,
                                  Koen

                                  • 14. Re: Upload/Download File with jBPM Webapp
                                    Keith Davis Newbie

                                    Koen,

                                    Being a veteran of software development for over 12 years, I would offer that intelligent design at the start of a project includes planning for graceful upgrading to future versions. Many other companies provide you with upgrade wizards, backward compatibility, etc. For example, Sun's Java gives you deprecation warnings and time to change your code before old support is removed.

                                    When things change too much and too frequently it is almost like announcing 'vaporware'. Do I use what is there now or wait for the next new feature. When planning a new release, you have to be cognizant of your current user's implementations of your product and how the new version impacts them. Just try to remember some of us early adopters by making the transition to newer versions easier.

                                    JBoss does a great job and I wish you great success!

                                    Regards,
                                    Keith

                                    1 2 Previous Next