The Previous and Next buttons
We have a Next and a Previous buttons on each form, but we have yet to configure these buttons. The way we can achieve Next and Previous button behavior in the workflow is to have a pool variable called nextStep
and every time the Next or Previous button is clicked, we can set the nextStep
variable to the name of the step, and in the transitions from one step to another we can check for the value of nextStep
.
In the form, first make a backward transition from all the steps that are the endpoints of the forward transition. The final pool should look like this :
Now, open the first form of the workflow, Welcome, and click on the BookTickets button.
In the Actions tab, add an action that sets the next step to the variable
nextStep
. The way to do this is by inputtingBookTickets
in the Groovy script in the expressions field and saving it to the variablenextStep
.Similarly, in the SubmitReport button, type
SubmitReport...