A swimlane is used when a number of tasks in the process have to be done by the same actor. Instead of assigning these tasks individually to the same actor the are assigned a swimlane (or a process role as you wish). Then it is sufficient to assign this role once to a particular actor (for the first task assumed by this swimlane) and all the other task in the process with the same swimlane assignment will automatically be assigned to the same actor.
So your code excerpt is correct, but does not show the real benefit of swimlanes. These become apparent when there is a lot more tasks involved.
Hope this helps,
Thanks for the reply.