How to route an initial screen flow to a workbasket
As an application developer, you have a work object that goes to a screen flow where application users can specify information in one or more screen forms. You want to route the work to a specific workbasket so that the work object is in the workbasket initially when it reaches the screen flow. (See the example scenario.)
However, by default, PRPC will always prevent this because the router logic assumes that work in a screen flow must first be processed by a single user (an Operator ID); therefore, the default behavior always routes work in screen flows initially to user worklists. You can work around the default behavior and assign a screen flow initially to a workbasket by following the Suggested Approach.
- Create a screen flow with more than one assignment.
- Add routing logic in the Start shape of the screen flow.
- Label the Router activity as "ToWorkbasket" and specify the workbasket from the selection list.
- Create a process flow with one assignment after the Start shape and one flow action on it.
- Connect the screen flow created in Step 1 to the flow action. This is the main flow that you want to create the work object.
- Connect the flow End shape to the screen flow.
- Run the main flow to test it.
- At the first assignment, complete the fields of the work form displayed by the flow action and click Submit.
- See this error on the screen:
Flow <name of Screen Flow> had an error in step AssignmentSF4:
Unable to open assignee's Data-Admin-Operator-ID record <Operator ID>
Choose one of the following approaches.
- Insert an assignment shape in the main flow to route it to the workbasket before the screen flow subprocess. Then the application user can see and use the screen flow after he or she pulls the work from the workbasket.
This approach creates an additional screen for the user to submit before entering the screen flow. If this is not desirable, choose the second approach.
- Avoid the extra screen created in the first approach: Create a flow action that performs AutoSubmit when the user opens the assignment.
1. Create a new flow action, for example, StartScreenFlowAuto.
2. On the HTML tab, in the HTML Generation dropdown list, select Reference HTML.
3. In the HTML Reference field, specify the standard HTML ActionAutoSubmit.
If the new flow action is the default (highest likelihood) or is the only available flow action from the assignment, then as soon as the user opens the assignment from the workbasket, it will proceed to the screen flow.