The call activity
A call activity step in Bonita is like a function call in programming languages. Here a pool is called by a call activity, unlike a function. After the called pool completes, the control is passed back to the calling step. A mapping is defined from the parent pool to the subpool and a reverse mapping is also possible.
Let us illustrate the call activity in our TicketingWorkflow. One thing we notice is that we can separate out the report submission tasks into a separate pool. This is due to the fact that this task doesn't use the pool variables that we use for booking a ticket, nor are the variables used in this task useful in booking a ticket. Hence, it makes sense to separate out this activity.
Make a new pool called
Report
and add all the variables necessary for the report submission in this new pool, namely,report
,reportSubmitter
, andcomments
. Delete the two variables, exceptreportSubmitter
, from the TicketPurchase pool.Next, copy the two steps from the TicketPurchase...