How do I get the Routes-Select widget to populate with Routes configured in a start step of a job controller?
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
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");