Process instance disappears at task waiting for message boundary event

Hello,

I try to model a kind of state machine with bpmn and execute the process with the process engine. A reason for this is, that for example there are business requirement to execute some steps if a process is to long in some state.
I made an simplified example of the process attached to this post to show how I try to model that.

What’s happening during the execution is, that the steps before “Ordered” are executed, but then in “Ordered” waiting for the message to proceed, the process token in cockpit disappears and no running process is listed.

Do I need the change the type of the “Ordered” task to something different to avoid loosing the process?

I think it might help to do a quick tutorial on the BPMN standard.
There are a a lot of lssues with your model.

But to answer your question - Yes, you need to add task types to all tasks or the token will just run through the task without holding state.

Thanks @Niall.

I have looked through the tutorials but there is no example how to model a state machine (in an efficient way). Of course the pizza example has some kind of states, but that way it is not possible to model more than 10 states with 20+ transitions clearly arranged. Additionally I’m not interested (and don’t know anything) in the process part of the customer.
Also I had a look at Content State-Machine-Style Pattern? .

What kind of task type do I need to just wait for a boundary message event?

Can you explain the specific usecase and maybe i can suggest how it could be modeled.

One of the issues with your model is that fact that when you’re modeling tasks you need to think of them as items of work - not as a state you’re in.
e.g. “Ordered” is a state and not an item of work the State your in might be “Waiting for order confirmation” for example.

So if i was to guess - you’d actually be better with something like this:
https://cawemo.com/share/0186de39-b66d-4bd9-b95f-4b085e3e36e5

@bmaehr for your scenario you want to use a mix of receive task and timer event to hold state

You are looking at replacing your ordered box with just the receive task box. And have a non interrupting timer manage your reminders. You don’t need to look back to the receive event afterwards.

See that diagram as a example of the story. You are currently merging two different types of charts into a single Bpmn. You want to be doing the “b” chart in the link

@Niall Yes, I know that the tasks should be things to do and not states, but in this case I try explicitly to model a state diagramm in BPMN.
I finially ended up to change the state to a “Receive Task” receivinge a dummy message “never” I created just for this. It works now.


For other interested: This is a working solution, but as @Niall said, not the correct way to model it!

The more complex case I created the model for is (just for information) this:

1 Like

Have you thought about using Intermediate None Events as representation for the states that have been reached and then use Receive Tasks for the actuall waiting on messages?

Not yet, sounds like an interesting idea.

But how to model then actions happening after some time in a state?

Process is not correctly modeled. It should be self explanatory.

Message boundary event over the message receive task is not a good idea. Instead you can play with event based gateways.

Also there was(still is? Unless there has been a update I missed) issues when messaging it self/sending messages to/from the same Bpmn. You should message to other Bpmn instances, not the same instance.