3 Replies Latest reply on Nov 3, 2012 1:37 PM by rush_pawan

    Pass values between two workflow steps.

    ravindrareddydr Level 1

      Hi,

       

       

      I have requirement to pass values from one workflow step to another workflow step .

       

      1. In workflow step 1 , we have created dynamic user group.

       

      2. I need to get user group name in another workflow step.

       

       

      Thanks

       

      Ravindra

        • 1. Re: Pass values between two workflow steps.
          rush_pawan Level 4

          First of all if you want to pass custom property to next step then you have to customize the current and next step (if you can it as process step). As of now i can think of one approach by setting up value in meatdata of next route as below in your execute method (if there is only one next step not with "and" or "or" condition otherwise you have to use id or name to find out next step).

           

          first step

          List<Route> routes = session.getRoutes(item)

          Route route=routes.get(0);

          route.getDestinations().get(0).getMetaDataMap().put("key", value)

          session.complete(item,route);

           

          destination step

          MetaDataMap map=item.getWorkflowData().getMetaDataMap();

          map.get("key");

           

          You can try once to check if it works else check through session. Let me know if it doesnt' work for you.

          • 2. Re: Pass values between two workflow steps.
            rajavijaysingh Level 1

            In a process step, you won't be able to get the userId of who acted upon it, as for all process step the user in the workflow session would be admin. In case if you are using custom UI instead of using the default workflow inbox then you can try handling using node structure to update the payload path or some temp node with your data

            • 3. Re: Pass values between two workflow steps.
              rush_pawan Level 4

              Correct, and passing custom paramter should be a valid option and abslutely to avoid customizing the inbox ui.