Flexplorer: Cats & Dogs

You find Lucy in a corner, hunkered over her phone. "I have a question about swapping a fleet…​", you begin, but Lucy makes a gesture not to disturb her.

"There, that’s handled, " she says, looking up at you. "Sorry about that, I just needed to forward another e-mail to maintenance. There are so many of these requests a day and things change a lot, it’s taking up too much of my time. Anyway, what was it you needed?"

You explain that you wonder what happens to scheduled maintenance when customers swap their fleet. It turns out, that this is one of the kind of changes Lucy was referring to. Flexplorer will likely see the fleet return when it’s swapped, allowing a mechanic to perform the maintenance without visiting the customer site.

Get Set Up for the Assignment

Using git

Checkout the flexplorer-assignment-3-start tag in the assignments repository.

git checkout tags/flexplorer-assignment-3-start

This will put git into 'detached HEAD' mode (it will inform you of this). If you want to create a branch from here to save your work, git will tell you to do the following.

$ git switch -c <your-branch-name>

This way, you have a branch based on the tag you started with and you can create commits on your branch to save your work and still be able to jump through the history.

If you want to combine the two in a single action, execute the following command.

git checkout tags/flexplorer-assignment-3-start && git switch -c my-work-from-flexplorer-assignment-3-start

Using the Tree

Use your file explorer to go to the directory where you extracted the resources. Now go to the subdirectory in there named flexplorer-assignment-3-start. The files you need to get started are there.

Maintain Fleet

Go into the swap-fleet.bpmn model first and add a signal throw event as soon as the process has started to be able to respond to it in the maintain-fleet.bpmn model in a moment.

If a fleet is being swapped when an instance of Maintain Fleet is running, Flexplorer needs to assess whether the swap affects the fleet under maintenance. There’s a task after the fleet swap signal that assesses the impact for the current maintenance fleet. If the fleet’s not affected, no action is taken and the Maintain Fleet process continues as before. In case the fleet is affected, the need to perform the maintenance should be re-evaluated. There’s a whole subprocess behind the re-evaluation that you’ll not focus on for now.

Add the BPMN constructs needed so the process model in swap-fleet.bpmn can respond to fleet swaps.

Bonus Assignment

Take a look the solution for this assignment and see if you can figure out where the solution could be further improved by thinking through the various scenarios that the process should deal with.

There are two areas to consider: the timing of a fleet swap and the outcome of the re-evaluation.

Swap Fleet

"Another change that happens regularly is now causing me a headache," Lucy says. "Stian introduced customised lease packages a couple of months ago, but we can’t automatically calculate for them, since they’re customised. At the moment, the process engine gets stuck if that happens and guess who they call? You get one hint: it’s not Stian."

You ask Lucy to bring up the model and point to the Calculate new lease task. "That’s the one, huh?", you ask. "What needs to happen for these customised leases if they can’t be calculated normally?"

"Ehhh, we just calculate the new lease by hand with the customisations for now, " Lucy says. "Then we do the same as for the regular ones, Negotiate service grade."

Open the swap-fleet.bpmn once more and update it to account for these calculation exceptions.

Resell Fleet

"It’s hard to get this exactly right, " Stian begins as he walks in. You make a gesture for him to join you and as you expected, he wants to improve the Resell Fleet process further. "We should stop making offers if there’s a condition issue with the fleet being resold." Stian points to the subprocess. "We get an initial signal that it’s being investigated by one of our people in the field. We should wait with making offers until we get either a release or a declination assessment. If it’s the latter, we’ll stop making offers and plan to resell the held fleet manually instead. It’s just not worth automating any further at that point."

Stian points to the timer event that reads 3 months. "That’s a rather arbitrary thing really," he continues. "Can you show me how we could basically just…​ actually, just wait until we get to 70%? There’s no need to be waiting unnecessarily for three months to check for 70%, is there? If we calculate the sale percentage every time one of the customers accepts an offer to take part of the fleet, we can stop the offering as soon as we hit 70% and then stock the remainder and schedule the delivery. It would also move things along faster for the customers who accepted early on; they’ll get their new fleet as soon as we can this way."

He points to the model. "Come on, you’re our BPMN wizard now, surely you can magically make sense of my braindumps and the model? I’ll go look to see if the fjord cruiser is going to be back on time so we can go for a quick speed tour down the fjord before sunset. You give it a go in the meantime, yeah?" He stands, winks and gives you a double thumbs-up before ducking out the warehouse door.

Take another look at the model in resell-fleet.bpmn and change the model so resales go even smoother.

Assignment Example Solution

Using git

You can checkout the flexplorer-assignment-3-end tag to see an example solution.

If you were working on your own branch and don’t want to lose your own changes, don’t forget to commit to your branch before switching.
git checkout tags/flexplorer-assignment-3-end

Using the Tree

Use your file explorer to go to the directory where you extracted the resources. Now go to the subdirectory in there named flexplorer-assignment-3-end. The files with the example solutions are in the directory.