3 Replies Latest reply on Apr 18, 2011 4:07 AM by parvez.shah

    Start a new process

    parvez.shah

      Please excuse this question as I amvery new to BPM

       

      My problem is I am not able to get initial datarequired to start process

       

      That is for example if my process is likethis

       

      Process name Taxi Booking

      Start ---> human task (Book Taxi) --->human task (Approve or reject) ---> End.

       

      User will access web form and enter bookingdetail

       

      On submit

      Application will **START** the JBPMProcess....

       

      But the problem is our web form is dynamic ...so how do I get List of "Parameter Mapping" of the fist human taskwithout even starting the process.

       

      I searched process API, but it does notprovide me detail of task till I don’t start the process..

       

      Please help Thank you

        • 1. Start a new process
          salaboy21

          If you want to start your process you will need to use an start event.

          If your first task collect the booking information you can send that information using the method

          ksession.startProcess("process.id", parameters);

          Where parameters is a Map<String, Object> that contains the information to initialize the process.

          If you don't want to do that, you need to start first the process with any parameters and then present the first task to the user to complete the booking information.

          Greetings.

          • 2. Start a new process
            parvez.shah

            Thank you for the quick reply,

            I am sorry if my question was not clear.. 

             

            I need to know what are the parameter i need to pass to start the process

             

            >>ksession.startProcess("process.id", parameters);

            >>Where parameters is a Map<String, Object> that contains the information to initialize the process.

             

            use case is very standard use case ..

             

            user will select a process to start , for example taxi booking,

            UI will be created dynamicaly, based upon what kind of parametr has to be passed to start the process,

            and then upon submit we will start the process,

             

             

            But as you have said

            >>If you don't want to do that, you need to start first the process with any parameters and then present the first task to the user to complete the booking information.

             

            in this manner we will have many orphan process as maybe user will simply open booking screen and then browse away from the page

            • 3. Start a new process
              parvez.shah

              If there is no API then how about this hack

               

              For the process

              >> Start ---> human task (Book Taxi)--->human task (Approve or reject) ---> End.

               

              I will also parse the BPM file and try toread first human task from the process (only for human task initiated process).And read the first human task "Parameter Mapping", which I canuse later to build my UI.

               

              is it an overkill is there an API.. Which takes processID and provides complete task path whichare present in BPM file