RFCs are a way for Atlassian to share what we’re working on with our valued developer community.
It’s a document for building shared understanding of a topic. It expresses a technical solution, but can also communicate how it should be built or even document standards. The most important aspect of an RFC is that a written specification facilitates feedback and drives consensus. It is not a tool for approving or committing to ideas, but more so a collaborative practice to shape an idea and to find serious flaws early.
Please respect our community guidelines: keep it welcoming and safe by commenting on the idea not the people (especially the author); keep it tidy by keeping on topic; empower the community by keeping comments constructive. Thanks!
Summary of Project:
We would like to gather interest in a new feature allowing Forge apps to emit events that can be received by other apps. It would integrate seamlessly with the existing trigger module.
- Publish: Oct 15, 2024
- Discuss: Nov 1, 2024
- Resolve: Dec 6, 2024
Problem
Currently, Forge apps cannot communicate between themselves. This can make it harder to build integrations between apps developed by the same or different Marketplace vendors.
Today, Forge apps can already receive events from Atlassian products by using the trigger module.
The trigger Forge module can listen to a limited set of events, such as avi:jira:created:issue
or avi:confluence:created:page
, but apps cannot directly send events to other apps to inform them that something has happened.
Proposed Solution
We would like to introduce a new Forge module that apps can use to indicate their intent to send events. The module would look like this:
customAppEvent:
- key: my-custom-event-module
eventKey: my-custom-event-key
name: My Custom Event Name
Apps declaring this module would be able to use it like so:
import { customAppEvents } from '@forge/customappevents';
customAppEvents.emit(my-custom-event-key);
Other apps would then be able to process this event by using the usual trigger
module with a new event type avi:forge:custom:app:event
:
trigger:
- key: customEvent-trigger
function: run
events:
- avi:forge:custom:app:event
filter:
eventKeys:
- my-custom-event-key
export async function run(originatingApp, event, context) {
// 'event' would be {eventKey: "my-custom-event-key"}
}
Asks
While we would appreciate any reactions you have to this RFC (even if it’s simply giving it a supportive “Agree, no serious flaws”), we’re especially interested in learning more about:
- Would your apps benefit from such a feature? How would you use it?
- Do you have any concerns about privacy or any other feedback?