2
1
0

How do I get the Routes-Select widget to populate with Routes configured in a start step of a job controller?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Rak,

      If you really want to use the Route Select its possible to set the available routes.

      Form.setSystemData("Job.AvailableRoutes", value); 

      where value = "A|B|C"

      This is what the Collaboration - Preview Test Block Widget uses see diagram below.


      Cheers 
      Larry Bunton

       

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Rak,

        Tasks that are part of  a collaboration job get the AvailableRoutes from Job Context in the form XML. The Jobs.AvailableRoutes node is what populates the Route Select Widget. More info on the Job Context can be found toward the bottom of this page - Form Design

        The Collaboration Job doesn't start until after the initial form is submitted. A newly rendered form doesn't have the Job Context and therefore does not get the AvailableRoutes populated. 

        An Immediate work around this issue use a standard drop down and specify the Route Names manually. I prefer using radio buttons I think they look nicer. The widget could have a visibility rule to only show when the form is initially filled. Form.isStep("").

        Use the following code set the route name after the dropdown has change or radio button pressed.
        Form.setSystemData("Job.RouteName", "RouteA");

        Cheers

        Larry Bunton 

          CommentAdd your comment...