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 received 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 modelling for now, so add it as a black box subprocess for now.

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

Take a Hint

Before you look at the hints below, remember that these assignments are meant to practice applying the BPMN constructs and modelling practices that were explained earlier. It’s likely you can apply the most recently introduced ones in these assignments.

Not sure how to proceed?
Here are some suggestions that don’t give it all away 😉

  • The assignment points you straight to a signal event for swap-fleet.bpmn, so start with that.

  • Consider that swapping a fleet may happen during a Maintain Fleet process, but it’s by no means a regular occurrence. What construct would allow to deal with some event that’s entirely optional?

  • If Swap Fleet is throwing a signal, what needs to happen in Maintain Fleet to respond to that?

  • What kind of task is usually used to model assessments that follow strict rules?

  • How could you deal with an event that requires "revisiting" some of the actions that have already been completed in a process?

Still struggling?
Read on for some concrete suggestions.

You could use the following BPMN constructs and modelling practices to achieve this.

  • Event subprocess

  • Non-interrupting signal catch event

  • Compensation end event

  • Business rule task

  • Compensation activity with association link

  • Collapsed subprocess

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.

On this assignment especially, keep it simple 😉!
Take a Hint

Before you look at the hints below, remember that these assignments are meant to practice applying the BPMN constructs and modelling practices that were explained earlier. It’s likely you can apply the most recently introduced ones in these assignments.

Not sure how to proceed?
Here are some suggestions that don’t give it all away 😉

  • Lucy mentioned that Stian’s customised leases can’t be calculated automatically. How could you model that a calculation couldn’t be performed?

  • Don’t overcomplicate matters; you only need a couple of minor changes.

Still struggling?
Read on for some concrete suggestions.

You could use the following BPMN constructs and modelling practices to achieve this.

  • Error boundary event

  • User task

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.

Take a Hint

Before you look at the hints below, remember that these assignments are meant to practice applying the BPMN constructs and modelling practices that were explained earlier. It’s likely you can apply the most recently introduced ones in these assignments.

Not sure how to proceed?
Here are some suggestions that don’t give it all away 😉

  • This section is all about large scope elements; don’t be afraid to overhaul larger segments of the model if you think you need to.

  • Recall that Stian wants to start waiting for reaching the 70% straight away: think of a way to model that.

  • Do you recall a construct to aggregate various event contexts in a BPMN model?

  • Consider that normally, we wouldn’t expect the fleet to be held after inspection, so maybe that’s more of an exception than a rule? Make sure that’s clear in your model.

Still struggling?
Read on for some concrete suggestions.

You could use the following BPMN constructs and modelling practices to achieve this.

  • Event subprocess

  • Script task

  • Non-interrupting message catch event

  • Event-based gateway

  • Error end event

  • Throw-catch

  • Error boundary event

  • Message end event

  • Interrupting signal catch event

  • Interrupting conditional event

Bonus Assignment

Once you’ve completed the assignment for Resell Fleet, focus on the scenario where Flexplorer manages to resell over 70% of the swapped fleet and immediately stops offering the fleet. Do you see options to further improve the process in that case?

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.