Repository navigation
Description
Problem
The bundle can deliver to a waiting process only in two ways today: trigger an execution by id (flowable:execution_trigger) and send an event instance through the Event Registry (flowable:event_send). What a process is waiting for cannot be listed, and a BPMN message or signal cannot be delivered without knowing the execution id. An application that wants to correlate a message by a business key has to search the executions itself.
What exists
- trigger an execution (receive task) by id, as an operation and as a console command;
- create an event instance of the Event Registry (event and channel definition);
- list jobs and execute a timer job now.
Proposal
The missing parts of the event interface, each as its own operation with an input schema and a console twin:
- Read waiting event subscriptions: a read-only resource over the engine's
runtime/event-subscriptions, filterable by event type, event name and process instance. This is the table of what waits for what. - Deliver to a subscription: an action on one subscription that delivers exactly its event (message or signal), optionally with variables.
- Deliver a message by business key: message name plus business key or process instance id, optional variables; the bundle finds the subscription and delivers.
- Send a signal: a pass-through to the engine's signal endpoint (a broadcast, hence its own operation).
Separate operations per channel, not one endpoint with a oneOf schema: reach and failure modes differ (a broadcast is not a targeted message), and each operation keeps a plain input schema.
When nothing waits for the message, the request is rejected (409); the bundle does not buffer. Buffering cannot be done in the engine and would be the application's decision.
Permissions
In the permission model of the bundle, not in roles: the read falls under flowable:read. For the deliveries, either flowable:event_send is reused or new permissions are added per channel (for example one for targeted delivery, one for the signal broadcast), since a broadcast reaches further than a targeted message.
Open questions
- One permission for all deliveries or one per channel?
- Is 409 the right answer for "no subscription waits", or 404 on the business key?
- Are the deliveries exposed as MCP tools, and behind which switch?
- Object-level access for the subscription list follows Object-level access for read operations #29.
Out of scope
Error, escalation, compensation and terminate events are thrown inside a process and get no API. An application's own facade over a fixed message name stays in the application.
Context
Counterpart of mlr/za7-fogu-api#15.
Activity