1 Reply Latest reply on Nov 2, 2012 9:24 AM by rush_pawan

    Startworkflow from particular workflow step

    ravindrareddydr Level 1

      Hi,

       

      I am working on workflows.

       

      I have diffrent types of steps in my workflow .

       

           Start

             |

          Step 1

              |

          Step 2

             |

          Step 3   Approve / Terminate

             |

           Step 4

             |

          Step 5 -  - Approve / Reject

              |

          Step 6

              |

           END

       

      Can any one help on these.

       

      1.In Step 5, If user rejects  workflow , i need start workflow from Step 2 and Ends current workflow.

       

         i have seen workflowSession.Startworkflow()  , but these are starting workflows from step 1.

          i need start workflow from Step 2 or step3 ?

       

      2. In Step 3 , when user terminate i need terminate workflow.

       

        I was tried

       

      public void execute(WorkItem item, WorkflowSession wfsession, ........)

        {

                                    Workflow workflow = item.getWorkflow();

                                    wfsession.complete(item, wfsession.getRoutes(item).get(0));

                                    wfsession.terminateWorkflow(workflow);

                                    

                          }

       

      I did not see workflow End ?

       

       

      Thanks

       

      Ravindra