2 Replies Latest reply on Mar 5, 2013 11:45 PM by mizakr

    Terminate Workflow with Feedback


      hi guys,

      how can I show a message "Workflow could not be completed" when Workflow is Terminated?

      I try to create "Dynamic Participant Step" but not always the parameter will be correct --> then the workflow should be terminated and an author should get a feedback that something goes wrong..


      I try with "throw new WorkflowException(...);" but then the Workflow is terminated without any feedback that somethig goes wrong..

      I also try with "return null" - then the Author get a message ""Workflow could not be completed" but only if before this step is a participant step.

      When before is a Process Step, then the wrong step is repeated 4 times --> the workflow goes in STALE state and an author get any message...

        • 1. Re: Terminate Workflow with Feedback
          rush_pawan Level 4



          To cross check, when you throws an exception you dont throw exception based on raised exception like


          throw new WorkflowException(e);   // where e is an exception


          instead do


          String message = "Message you want to show";

          throw new WorkflowException(message);


          Also try to check your process step implementation for other issue, it seems that you are terminating your process step wrong, otherwise above will so the correct message.




          • 2. Re: Terminate Workflow with Feedback
            mizakr Level 1


            I terminate Workflow like this:


            if (...) {

                  return "some_group";

            } else {


                 throw new WorkflowException(new Message("Reason"));



            so it seems to be correct.. what you think?