2 Replies Latest reply on Sep 13, 2010 6:54 AM by Andrea Vanz

    variable String to associate jbpm with a document

    Andrea Vanz Newbie

      Hi,
      I've a process definition composed by 3 task that I want to associate with a document.


      How can I do this? I tried to put a variable String (that contained the name of the document) into the process definition but doing this the content of the variable doesn't remain the same but changes based on the last content of the variable I input in the last process istance of the process definition.


      Thanks

        • 1. Re: variable String to associate jbpm with a document
          Leo van den berg Master

          Hi,


          can you be a bit more specific, because I don't understand very well what you want to do.


          I understand that you have a specific BusinessProcess related to a single document and that you have three tasks related to that single document. The part I don't understand is:





          --the process definition but doing this the content of the variable doesn't remain the same but changes based on the last content of the variable I input in the last process istance of the process definition.

          What do you do to relate the document with the ProcessInstance. In other words some code /workflow would be very helpful.


          Leo

          • 2. Re: variable String to associate jbpm with a document
            Andrea Vanz Newbie

            After further test this is the situation.
            I took the example todo of seam and I adapted it to my case with developing a jPDL with 3 Task. The application works that I'm doing is very similar because the user must accept and reject each task. These operations must be made on a document that, in my case, is a simple string.


            My problem is able to attach the string which contains the document name with processInstance.


            The attempt that I did was to create a Java class support and add a String field DocumentName. When I create the ProcessInstance give a value to the string and update the user's task list where appear the task 1 and DocumentName with the value previously entered correctly. Just turn into the second task, the variable content is lost and I see #{todoDoc.documentName}.(todoDoc is the support class)