7 Replies Latest reply on Jul 3, 2006 6:49 AM by mohan514

    Is there any other site which can help beginners

    mohan514

      hi all,
      is there any other forum that i can find for help on writing the client for the JBPM. AND other related stuff.
      regards,
      cityofdestiny.

        • 1. Re: Is there any other site which can help beginners
          kukeltje

          define "the client", what information you looked at and why it is not enough.

          • 2. Re: Is there any other site which can help beginners
            mohan514

            iam writing a webapplication(jsps and servlets(client)),
            iam using the following class to call the jbpm engine to get the data but it is not behaving as i think iam using the following code for the starting of the process :

            public String startProcessInstance(long processDefinitionId,List taskFormParams)
            {
            JbpmContext jbpmContext = null;
            try {
            System.out.println(" the process definition id is " + rocessDefinitionId);
            jbpmContext = jbpmConfiguration.createJbpmContext();

            Connection conn = jbpmContext.getConnection();
            conn.setAutoCommit(true);
            GraphSession graphSession = jbpmContext.getGraphSession();
            ProcessDefinition processDefinition = graphSession.loadProcessDefinition(processDefinitionId);
            ProcessInstance processInstance = jbpmContext.newProcessInstance(processDefinition.getName());
            ContextInstance contextInstance = (ContextInstance) processInstance.getInstance(ContextInstance.class);
            int size=taskFormParams.size();
            for(int i=0;i<size;i++)
            {
            TaskFormParameter taskFormParam = (TaskFormParameter)taskFormParams.get(i);
            System.out.println("the task form param is "+taskFormParam);
            String label = taskFormParam.getLabel();
            System.out.println("the label is "+label);
            contextInstance.setVariable(label,taskFormParam.getValue());
            }

            TaskInstance startTaskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
            Task task = startTaskInstance.getTask();
            StartState startState = task.getStartState();
            startTaskInstance.start(startState.getName());
            List transitions = startTaskInstance.getAvailableTransitions();
            int size1 = transitions.size();
            System.out.println("the no of transitions" + size1);
            String name = "";
            Transition transition = null;
            for (int i = 0; i < size1; i++) {
            System.out.println("the transaction is " + transitions.get(i));
            transition = (Transition) transitions.get(i);
            name = ((Transition) transitions.get(i)).getName();
            System.out.println(" the name of the transition is " + name);
            }
            System.out.println(" the name is " + name);
            if (transition != null) {
            startTaskInstance.end(name);
            System.out.println("the transition is u r at the end of transtionin if b;ock");
            }
            else {
            startTaskInstance.end();
            }
            processInstance.signal();
            conn.setAutoCommit(false);
            jbpmContext.close();

            } catch (JbpmPersistenceException e) {
            System.out.println(
            "this is persisstence exception" + e.fillInStackTrace());
            } catch (Exception e) {
            System.out.println(e.fillInStackTrace());
            } finally {
            System.out.println(
            " this is in final section to close the context");

            }
            return "task";
            }

            i thought that it illl execute the start state and it ill stop at the second state but it is also executing the next state also.
            it is behaving differently i didnt find any eror in this code and also the console si not showing any errors.
            please help me or guide me i am a new bie to JBPM how to write webapplication(simple jsps and servlets ) with out using the beans of the JBPM webapplication.
            "Any help regarding this will be appriciated".
            Regards,
            mohan.

            • 3. Re: Is there any other site which can help beginners
              kukeltje

              you end the task AND signal the process. try removinfg the processInstance.signal()

              • 4. Re: Is there any other site which can help beginners
                mohan514

                thank u for ur early reply,
                And now iam able to close the save and close the task fo the user.

                • 5. Re: Is there any other site which can help beginners
                  mohan514

                  hi,
                  iam able to close the task but the code is creating two tasks one task is as intended but another task is creating to the user who starts the process iam using the same code by removing the processInstance.signal();
                  please help me.
                  "Any help regarding this will be approciated"
                  Regards,
                  cityofdestiny.

                  • 6. Re: Is there any other site which can help beginners
                    kukeltje

                    use new threads/topics for new questions

                    • 7. Re: Is there any other site which can help beginners
                      mohan514

                      hi,
                      i solved the problem and now iam able to get all the facilities in my custom client,
                      thanX for ur help.
                      Regards,
                      mohan chokkakula.