knix-microfunctions/knix

allow user-supplied data be included in the trigger from TriggersFrontend

iakkus opened this issue · 0 comments

Currently, the TriggersFrontend will trigger a workflow execution associated with an external event. The external event's data is used as the trigger message's content. This scheme works well with stateless functions.

The TriggersFrontend does not currently allow a trigger to be associated with a workflow that is using an addressable function as the entry point to the execution for a given session. For example, an application-level session may instantiate an addressable function that will do the processing for the external event. However, addressable functions that belong to a session, can only be addressed with their session_id parameter.

The proposal is to allow user code to create triggers with additional data, such that each triggered workflow execution can contain this additional data besides the external event's message content. In the case of a workflow with an addressable function, this parameter would be the session_id, so that any triggers would be delivered to that session. The trigger would be then specific to the session (i.e., would be created when the session is created).