I’m new to Flowable and I’m trying to get a simple BPMN flow up and running with a message receive task. I’m trying to trigger the event via the REST API using the execution id but I’m having trouble which I’m sure is just my lack of knowledge.
I have flowable deployed in docker using the flowable/flowable-rest image with postgres:9.6-alpine as the backend.
Here are the relevant parts of my process definition:
<process id="test" name="test" isExecutable="true">
<startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
<receiveTask id="sid-48E45835-B603-45FE-87DB-271079B1CA24" name="WaitForEvent1">
<extensionElements>
<flowable:eventType xmlns:flowable="http://flowable.org/bpmn"><![CDATA[EventKey]]></flowable:eventType>
<flowable:eventName xmlns:flowable="http://flowable.org/bpmn"><![CDATA[EventName]]></flowable:eventName>
</extensionElements>
</receiveTask>
<endEvent id="sid-C07823C5-5245-4ADB-9B9A-B600A7EE56A5"></endEvent>
<sequenceFlow id="sid-1BE97631-EC89-47DC-87C3-C4E6988608AA" sourceRef="sid-48E45835-B603-45FE-87DB-271079B1CA24" targetRef="sid-C07823C5-5245-4ADB-9B9A-B600A7EE56A5"></sequenceFlow>
<sequenceFlow id="sid-AF281EC9-759F-4E38-BB8A-259914F54125" sourceRef="startEvent1" targetRef="sid-48E45835-B603-45FE-87DB-271079B1CA24"></sequenceFlow>
</process>
Once the process instance is running I can see the event subscription in the REST API, but the eventName is null. Not sure why but I think this is the root of the problem outlined below.
{
"data": [
{
"id": "868576e0-79f3-11ec-99f8-0242c0a87006",
"url": "http://thud:8081/flowable-rest/service/runtime/event-subscriptions/868576e0-79f3-11ec-99f8-0242c0a87006",
"eventType": "EventKey",
"eventName": null,
"activityId": "sid-48E45835-B603-45FE-87DB-271079B1CA24",
"executionId": "868528bc-79f3-11ec-99f8-0242c0a87006",
"executionUrl": "http://thud:8081/flowable-rest/service/runtime/executions/868528bc-79f3-11ec-99f8-0242c0a87006",
"processInstanceId": "868528ba-79f3-11ec-99f8-0242c0a87006",
"processInstanceUrl": "http://thud:8081/flowable-rest/service/runtime/process-instances/868528ba-79f3-11ec-99f8-0242c0a87006",
"processDefinitionId": "test:4:24e56619-79f3-11ec-99f8-0242c0a87006",
"processDefinitionUrl": "http://thud:8081/flowable-rest/service/repository/process-definitions/test:4:24e56619-79f3-11ec-99f8-0242c0a87006",
"scopeId": null,
"scopeType": "bpmn",
"subScopeId": null,
"scopeDefinitionId": null,
"created": "2022-01-20T13:18:58.255Z",
"configuration": null,
"tenantId": ""
}
],
"total": 1,
"start": 0,
"sort": "id",
"order": "asc",
"size": 1
}
When I try to execute the message received event using this payload I get a 500 error. I am doing a put on http://thud:8081/flowable-rest/service/runtime/executions/868528bc-79f3-11ec-99f8-0242c0a87006
{
"action": "messageEventReceived",
"signalName": "EventKey",
"messageName": "EventName"
}
{"message":"Internal server error","exception":"Execution with id '868528bc-79f3-11ec-99f8-0242c0a87006' does not have a subscription to a message event with name 'EventName'"}
And when I try to invoke it with a blank or a null messageName, I get this
{"message":"Internal server error","exception":"Execution with id '868528bc-79f3-11ec-99f8-0242c0a87006' does not have a subscription to a message event with name ''"}
Can anyone help me figure out what I’m doing wrong?