Need help modeling a dynamic website process

Hi everyone

I’m new to BPMN, but I have read through all the specifications, read a few books and watched several full length courses about BPMN. I did it all in a fairly short amount of time, and now my brain is a bit fried. I could use some help.

I’m trying to model a process that involves a website which changes its content depending on the country where it is accessed by the customer. Basically, before the user lands on the site, the backend system decides which content to show based on the IP address accessing the website, and then presents the appropriate content.

I can’t seem to figure out how to model that. I created a separate pool for the user and for the backend system. My first task is “attempt website access”. If I understand correctly, next step would be to message the Backend pool, which then returns the message to the customer pool. But how do I define which content will be shown to the user? I can’t really put an XOR gateway in the customer pool, because customer doesn’t really choose anything… the choice is done by the backend.

I hope this made sense. So yeah, any ideas?

How about something like this?

This assumes that your website is going to get the content from the content source.
If the process is supposed to get the content as well, then could have the "Determine which “content set” to show task be a “get content” task and pass a json object back to your website service to display content.

Hi Stepehen! Thanks for responding!

I was actually thinking of describing the flow of the customer… Here’s what I have modeled so far:

So basically, I don’t know how to make a different “explore website” ad-hoc subprocess based on the decision made by the backend. Is that even possible? What I would expect is that the token is directed to a different version of the “explore website” subprocess based on that decision, but it doesn’t make sense to me because it would imply using the XOR gateway in the Customer pool, implying that the customer himself is making the decision, when in fact he isn’t.

@anon14085959, I do not believe Camunda currently supports AdHoc sub-process tasks. Please correct me if otherwise.

How much time are you expecting between the User Task and the “Website Loaded” event? Using Workflow engine may not be the most performant compared to a standard web server implementation.

You may also want to get rid of the User task and go with a Start Event triggered by the user accessing the website, followed by a Message throw that connects to your “Attempt to access detected”. This way someone could go to the webpage/auth area and not request to access the page and not start the process instance. Otherwise you are likely to have a lot of orphaned instances.

Edit: are you trying to display website content using the user tasks? or do you have a CMS of some sort?

It does, this whole process was done using Camunda Modeler.

The website already works like this and it leads quite fast, but we’re working on improving the process a bit. It also includes me modeling some of the existing processes, which is what you currently see on the diagram I attached.

I’m not familiar with the Workflow engine though. All I’m interested is the visual representation.

Thanks for the advice, but it doesn’t really help with what I’m trying to figure out. I’m trying to create a flow where customer could either get to one or the other type of content, but that choice would not be made by himself, but by the backend.

Yes, I would want to present what the customer is able to do once he lands on the appropriate version of the website. I figured the adhoc subprocess would make most sense, since it allows him to either do tasks that are included as he wishes. I want to be able to show what the options for him are.

So I would essentially need two adhoc subprocesses, one that contains one set of tasks, and another that contains another set of tasks. But the problem is how do I direct the token based on the choice made by the other pool. It would be easy if the choice is made by the Customer himself, so I would use a simple XOR gateway, but it isn’t.

BTW sorry if the questions is a bit dumb, but hey, I only just started :smiley:


sorry maybe i am just confused. Are you using Camunda BPM Engine to execute the BPMN or are you just trying to model your business process in Camunda Modeler?

@StephenOTT No worries! I’m only trying to model the business process, so that I can demonstrate it to the development team. So there will be no execution using the Camunda BPM engine. At least until I figure out how to use it :smiley:

@anon14085959, okay so the Modeler and the engine do not perfectly “line up”. Meaning that just because you can model it does not mean the engine will execute it (not everything is implemented in the engine). So if you plan to be executing the model, you have to think a little differently,

You also have to think about how the engine actually functions. In some cases, you end up not modelling it the exact “formal” way because of the way the engine works, and you model it in a way that gives you a desired engine outcome.

AdHoc tasks i believe is a example: you can model it, but the engine does not execute it.

Ok, but can you please help me with the question I have, regardless of the engine? I really have no intention of using it, but want to present the process properly using BPMN standards. Do you have any idea how to solve this?

The way you have it modelled right now implies one long customer process.

I would think of it more in the following structure (based on the diagram you provided):

Think Async where each visit the website or even visit of the page is a complete process instance.

The BPMN determines what the user is allowed to do, and returns the available actions to the web server.
The DMN (the business rule: “Determine website actions available to user based on access rights”), returns 1 or more “actions” based on the restriction. In Camunda when you model with different Pools, this creates different “Processes”. If you look to prototype this with camunda, it would be easier to do all of this in 1 pool without the messages.

Available actions could be stored as part of the server session, scopes, or which form of server side restrictions.

If you want to control the website sections with user tasks, take a look at Camunda CMMN. (similar to ad hoc tasks)

edit: you could also have the DMN run on the “back-end” / bottom pool, but was thinking that you may want to model scenarios where you have different DMN for different types of users or lists to the website, and you may want to have the “Access Request” process/pool be more reusable / flexible.

Alright, that clarifies things a bit! Thank you so much!

So just to get this straight, is there any way to present which content is being visible on the site depending on the area of origin? Right now you packed it all under the business rule task, but I would like the diagram to present what it is that is available. Can that be done?