1 2 Previous Next 16 Replies Latest reply on Feb 17, 2006 12:07 PM by dsicore

    Document Management

    jimrigsbee

      Regarding JIRA issue http://jira.jboss.com/jira/browse/JBPM-113

      What types of features do you envision for document management in jBPM?

      The consensus so far is to base this on JSR 170. Many portal products embrace this JSR for content management. It seems like a good fit for jBPM as well. [/url]

        • 1. Re: Document Management
          tom.baeyens

          1) the ability to store javax.jcr.Node objects in the process variables would be great. you'll have to write a converter that makes use of the new services framework. take a quick look at JbpmConfiguration, JbpmContext,ServiceFactory and Service. and the configuration docs. then further questions, can be asked in this forum

          2) next could be an extension in the web app and variables configuration so that we can show a versioned word document in a web app. you'll probably need some kind of information in the task controller to know that this is a versioned document instead of just a string. that information can be added in the task controller itself or in the process definition as a kind of variable declaration...

          let me know if you have any other ideas or if my ramblings just don't make any sense :-)

          regards, tom.

          • 2. Re: Document Management
            jimrigsbee

            Let's start at the 50,000 foot level :)

            What do you envision managing? I'm a little lost as to the context.

            I thought it was referring to managing and versioning PDL documents. Please help me reorganize my thinking here :)

            • 3. Re: Document Management
              kukeltje

              what about the other way around? Take a look at Alfresco. The basis already contains so many features that imo Imo it would be better to persuade them to include jbpm for their workflow or start a new project which imo would be better positioned in the portal than in jBPM

              • 4. Re: Document Management
                tom.baeyens

                ah no, i was thinking about adding support for multiversioned documents inside of a process.

                imagine a process about some document that has to be approved. so we put the document into a JCR and keep a reference to it in the process variables. in the task forms, users should be able to download and see the different versions of the word document.

                that would be the basic idea

                regards, tom.

                • 5. Re: Document Management
                  tom.baeyens

                  i'm not sure if i get your point.

                  if we depend on a JCR impl, then portal, jbpm and alfresco could be deployed in one environment and use the same JCR, no ?

                  i know that portal guys got a good relation with alfresco. i might want to get their opinion.

                  regards, tom.

                  • 6. Re: Document Management

                    I have read the JIRA issue:

                    Jackrabbit is probably the way you want to go for a solid JCR impl. If you use the LocalFileSystem store with the XMLPM, you can have all your binaries, versions, and metadata stored on the FS, exclusively. Also, I wrote a simple HibernateStore and HibernatePM that allows for DB repository of all of this.

                    Juien and I now both sit on the JCR 2.0 spec, and Alfresco does as well.

                    • 7. Re: Document Management
                      jimrigsbee

                      Status update.

                      I'm working through learning the JCR API and how to work with JackRabbit. I finally have re-read these posts about a dozen times and finally get what you are after.

                      I will follow your advice, Tom, from your Dec 22. post regarding storing nodes in the process variable with the appropriate metadata in the repository. I'll tackle this one first and tackle the webapp later.

                      I'll post my design ideas here first for group feedback. I think I can have a design in the next two weeks.

                      Cheers, Jim

                      • 8. Re: Document Management
                        tom.baeyens

                        the first iteration shouldn't take two weeks design time. here's just some initial ideas of the top of my head:

                        * create a JcrService and JcrServiceFactory that wraps all access to a content repository. See the other jbpm services for examples. Main methods to look at are ServiceFactory.openService() and Service.close()

                        * configure the service in the <jbpm-context... in jbpm.xfg.xml

                        * implementing a org.jbpm.context.exe.Converter that takes a Node and stores it's id or key in one of the known VariableInstances:

                        public class JcrNodeConverter implements Converter {
                        
                         public boolean supports(Object value) {
                         if (value==null) return true;
                         return (javax.jcr.Node.isAssignableFrom(value.getClass()));
                         }
                        
                         public Object convert(Object value) {
                         javax.jcr.Node jcrNode = (javax.jcr.Node) value;
                         String? nodeId = jcrNode.getTheIdOrKeyOfThisNode(); // don't know the id of a node;
                         return nodeId;
                         }
                        
                         public Object revert(Object value) {
                         String? nodeId = (String)value;
                         JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
                         JcrService jcrService = jbpmContext.getServices().getService("jcr");
                         return jcrService.lookup(nodeId);
                         }
                        }


                        * lastly, add an entry in the jbpm.varmappings.xml that specifies to use the new converter and the appropriate variable instance type for objects of type javax.jcr.Node

                        nope this eliminates some of the need for code digging :-) let me know if you have other ideas about it or if you get stuck.

                        regards, tom.

                        • 9. Re: Document Management
                          jimrigsbee

                          The two weeks is based upon my availability :) I did not intend to indicate that this is difficult stuff.

                          The information you provided will save me time and I appreciate it.

                          I am also working to understand how one might use this. That is why I'm reading through the JSR (which I'm done with BTW). I want to make sure that we consider configuration issues, documentation, and test cases.

                          The coding is the easy part as you indicate!

                          Regards, Jim

                          • 10. Re: Document Management
                            tom.baeyens

                            great ! let us know if we can assist with anything.

                            regards, tom.

                            • 11. Re: Document Management
                              jimrigsbee

                              Which scenarios will we support:

                              1. read-only access to the repo
                              user creates node and content outside of jBPM logic or inside of action handlers within a workflow -> process variable can retrieve the node via a String path statement -> user reads and manipulates node in their own code

                              2. get/store access to the repo
                              build node object and set properties -> When variable is persisted we either create/update the object based on the String path statement -> user reads and manipulates node in their own code

                              This involves supporting transactions which is optional in some implementations. The content would be committed within the transaction in jBPM that persists the process state and variables.

                              Thanks, Jim

                              • 12. Re: Document Management
                                jimrigsbee

                                Since I have not heard anything I'll tackle the read only bit for now.

                                I've got quite a bit of the coding done...now to testing.

                                Do we only need to make sure we work with JackRabbit or are there some others out there that I should test as well?

                                Regards, Jim

                                • 13. Re: Document Management
                                  tom.baeyens

                                  sorry. overlooked this one.

                                  i also think that read only is the best place to start. start simplest and then see if there is missing features is the best way to prevent overengineering.

                                  jackrabbit is the default jcr for portal. so there is no real need to test with anything else.

                                  regards, tom.

                                  • 14. Re: Document Management

                                    Hi Tom and Jim,

                                    I couldn't help but notice you guys are working on interfacing with JCR. I just wanted to mention the Shotoku project enables you to interface with multiple JCR, SVN, and/or a file system based repo. This might make your life a lot eaiser since we've done all the hard work.

                                    http://labs.jboss.org/shotoku

                                    We'd be glad to help out with this. The JBoss Rules guys are also digging in to Shotoku as well for accessing JCR and SVN repositories. This way, jBPM could use either JCR, SVN, or file-system without changing APIs and you could use it to access JBoss Portal JCR of course.

                                    Cheers,

                                    Damon

                                    1 2 Previous Next