BPM - Event subprocess - signal

Hello,

with the following versions:
Jmix version: 2.1.3
Jmix Studio plugin version: 2.1.3-233
IntelliJ version: IntelliJ IDEA 2023.3.3 (Ultimate Edition)

we would have a business process in which we would use an event sub process. I have made a poc about this part in which we have troubles. The process is, that in the Review user task if the user accepts the request, the approve task comes. But if the user would like to ask some other reviews from other departments, send a signal with runtimeService.signalEventReceived() method and in this case the sub process should start. (In multiinstance mode, if more than one departments’ review is needed.) Here you can check the model of it:

image

Is it possible to do this in Jmix? Just because it stucks in the signal start event, doesn’t go to the CoDept Review user task. (I tried also if the sub process is not in multi instance mode.)

By the way, first the app couldn’t start:
Caused by: org.flowable.common.engine.api.FlowableException: Errors while parsing:
[Validation set: ‘flowable-executable-process’ | Problem: ‘flowable-signal-event-missing-signal-ref’] : signalEventDefinition does not have a ‘signalRef’ or a ‘signalExpression’ - [Extra info : processDefinitionId = codept | processDefinitionName = Codept | | id = Event_0u7eat2 | ] ( line: 57, column: 69)

After that I added to the xml in an external editor (in IntelliJ I couldn’t) the signalRef attribute to signal start event’s signalDefiniton. In this case the app starts and then it stops at the signal start event:
image

Could you please help us in this case?
Best regards,
Beatrix

Some follow-up:
first, the signal definition’s scope was process instance and in the signalEventReceived method I gave just the signalName and it didn’t work - that’s why I opened this topic.

Now, when I changed the signal definition’s scope to global and in the signalEventReceived method I give also the signal start event’s executionId (which belong to the same process instance) beside the signalName, it works well.

So I think the problem now is just the above mentioned missing signalRef attribute. If you can reproduce it…

Hi,

Do I understand the problem correctly:

  1. You created the business process in Jmix Studio (not in the runtime modeler)?
  2. The problem is that when you add the signal start event element, the properties panel for this element doesn’t contain the control to select the signal?

Hi Maxim,

I have created the business process using IntelliJ and its BPMN Inspector tool window doesn’t contain this element where I could select the signal for the signal start event, so yes.
image

Since my last post, I created an other business process and at least I could write the signalRef attribute in the xml using IntelliJ, I didn’t have to use an external editor, like in the previous project and process definition.

However, I have noticed an other problem in this new process definition: in the definition I have created the signal definition with global scope, using IntelliJ:

image

When I tried to run the app it had the following problem:
Caused by: org.flowable.common.engine.api.FlowableException: Errors while parsing:
[Validation set: ‘flowable-executable-process’ | Problem: ‘flowable-signal-invalid-scope’] : Invalid value for ‘scope’. Only values ‘global’ and ‘processInstance’ are supported - [Extra info : ] ( line: 295, column: 3)

I checked the xml: flowable:scope=“Global”
I changed it to: flowable:scope=“global”, so it works now.
Maybe also this info can be useful.

Thank you for the explanation and for reporting the problem. I’ve created an issue for Studio BPMN modeler.