Where to Define Business Rules and Start Tasks for Subprocess?

I am a new Camunda Modeler user. So I am recreating the Invoice Receipt process that is preinstalled on Camunda and when I tried to deploy I get the error below. I must say this raises a few questions for a new user like me.

  1. I don’t see start event as an option on the subprocess task? I see end event and boundary and intermediate event as the options from the context toolbar. So I would suggest either the error name be changed in requesting a start event to being something else or that the modeler have a start event as an option for a subprocess.

2). When I create a Business Rules task I would expect that either
a) Double clicking on this task would bring up a rules table or
b) Something in the context toolbar would have the rules table as an option
Neither seems to be the case.

Can someone clarify for me how bring up the rules table from the rules task. This should in my opinion be a very intuitive thing. And secondly how to specify the start task or if this is simply not correctly named and its a boundary event or something like that.

ENGINE-09005 Could not parse BPMN process. Errors:

  • One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on businessRuleTask. | resource another_invoice_receipt.bpmn | line 29 | column 50
  • One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on serviceTask. | resource another_invoice_receipt.bpmn | line 63 | column 69
  • subProcess must define a startEvent element | resource another_invoice_receipt.bpmn | line 67 | column 66
  • Exclusive Gateway ‘Gateway_1unbb1s’ has outgoing sequence flow ‘Flow_02smhrm’ without condition which is not the default flow. | resource another_invoice_receipt.bpmn
  • Exclusive Gateway ‘Gateway_1unbb1s’ has outgoing sequence flow ‘Flow_0odytr8’ without condition which is not the default flow. | resource another_invoice_receipt.bpmn

Hi @Steven
Thanks for the feedback, I’ll like a little more information and context if you don’t mind :slight_smile:

Can you explain this a little more, maybe with screen shots?

This makes sense and it’s something we’ve though about before, thanks for bring it up.

I don’t really follow this very well, can you explain what you’re trying to achieve and what issues you found when trying to accomplish that?

This means that you have a business rules task without any implementation details.

You also have a service task without any implementation details.

This seems quite clear - is the issue around understanding how to add a start event to a sub process?

This indicates that you have a gateway where the sequence flows have no implementation properties so they don’t know how to evaluate the gateway.

Ok, let me start by saying what I am doing is just trying to recreate the invoice.v2.bpmn model that ships with Camunda Platform by myself using the Camunda modeler. So I did this but there are some missing elements apparently. All I did so far was to select the correct type of task. Nothing else. I don’t see any errors until deployment time.

I am just saying that this error indicates I need a start event associated with the subprocess task. " * subProcess must define a startEvent element | resource another_invoice_receipt.bpmn | line 67 | column 66". Now I would probably select the Intermediate/Boundary event but because the error says Start Event it raises a doubt about if this is the correct type to remedy this issue. I suppose no reason an intermediate or boundary event cannot be a start event but I don’t know BPMN specification. When I am on a subprocess task the toolbar does not show a Start Event. The options given are Append EndEvent and Append Intermediate/Boundary Event respectively for each type of circle. Screen Shot 2021-04-27 at 16.34.24 .

Looking further I see there is a properties panel associated with each task. I would suggest that double clicking a task should probably bring this up automatically. A single click to bring up the context menu but multiple double clicks and I think its clear the user is trying to see more information about the task.

Here is what the correct model shows vs. what my model shows for properties on Review Invoice subprocess.
Screen Shot 2021-04-27 at 16.54.42

But my properties screen under general looks like:

Screen Shot 2021-04-27 at 16.57.06

And I don’t really see the same options here at all as in invoice.v2.bpmn even through the task type appears to be the same.

another_invoice_receipt.bpmn (11.1 KB)

Hi @Steven,

you replaced the call activity from the original example with a collapsed subprocess. These are two different task types: Embedded Subprocess | docs.camunda.org and Call Activity | docs.camunda.org

The subprocess you have chosen needs a process inside with at least a none start event.

So the error message is correct (from the engine point of view).

You have to expand the subprocess and add the start event inside. Or morph the subprocess to a call activity.

Hope this helps, Ingo

Well I clicked on the wrench and then chose to expand which is the option at the bottom. Not sure why this cannot be reversed but anyway it seems to me that it leaves the whole diagram in an unusual state. I think the intuition to expand would be to click on the + icon but for me the larger issue is that I don’t see why a subprocess has to remain in this expanded state? And also it seems a bit transparent as I can see what is behind it. Not really what I would expect. I would expect to be able to return it to the unexpanded state and just click the + when I want to see the expanded view. Is this still possible or a limitation of the modeler or a restriction of the BPMN specification? Also I notice its possible to drag the task inside the subprocess outside of it. Not sure how or why this would be allowed. What I would suggest is that a double click on the diagram returns it to the unexpanded state and a click on + expands it.

So after repositioning elements and expanding the swim lane I now see something like this:

So I guess that it must remain in the expanded state. I kind of see this. But what if it is a very large process? Would I then simply make it a separate process?

Hi @Steven,

This is a limitation of the modeler. BPMN in general allows switching between expanded and collapsed subprocesses.

But the engine requires a process in the subprocess box (as you saw in your initial questions). For this reason the modeler team decided to disallow collapsing of a subprocess. (You also have to rearrage the surrounding elements to make the diagram beautiful again).

The main purpose of a subprocess is provide attached boundary events to more than one element. For a simple subprocess as you have it right now, I would replace the subprocess with the simple task inside. But this is only my personal flavor.

Hope this helps, Ingo

Ok, thanks for the clarification. What would be a good example of a scenario that is suitable for subprocess? I am trying to visualize a scenario that needs to attach a boundary event to more than one element.

Hi @Steven,

have a look at the third diagram in this chapter: Embedded Subprocess | docs.camunda.org.

Hope this helps, Ingo