-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Added sample app for event based workflows #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📦 Trivy Vulnerability Scan Results
Report Summary
Scan Result Details✅ No vulnerabilities found during the scan for |
📦 Trivy Secret Scan Results
Report Summary
Scan Result Details✅ No secrets found during the scan for |
events/README.md
Outdated
|
|
||
| A simple application demonstrating how to build apps with the Atlan Application SDK using events. | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a small recording instead? - look at mysql example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do, let's validate the rest of the PR first in case there are changes required to avoid re-recording
events/main.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you try keeping this file consistent with other example's main.py? - the structure seems off, trying to build familiarity so that devs focus on what's new as part of this example
add, push other utility methods to utils.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done
events/workflows.py
Outdated
| print("workflow_type", workflow_type) | ||
| print("workflow_id", workflow_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again,
- keep the file structure consistent.
- use logger if needed across, I believe here we do not need these logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pyproject.toml
Outdated
| [tool.uv.sources] | ||
| # atlan-application-sdk = { path = "../application-sdk", editable = true } | ||
| # atlan-application-sdk = { git = "https://github.com/atlanhq/application-sdk", rev = "28e44136a73e923423fb19a7f3d2a802b75e19c6" } No newline at end of file | ||
| atlan-application-sdk = { git = "https://github.com/atlanhq/application-sdk", rev = "079acca9b08bbf8a19f8e3e157a4b92bc79f70c2" } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends on atlanhq/application-sdk#560
events/README.md
Outdated
| @@ -0,0 +1,49 @@ | |||
| # 📨 Events App | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed can we have two separate app. event generator app. event consumer app please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think that'll be ideal - we can demonstrate the concept under events directory itself under single app via two workflows - One workflow triggers another. Add more in the readme around use-cases that this can power via mermaid diagrams (ex: app to app, app to workflow, workflow to workflow and more).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey folks, updated the flow here -
Added a UI, user can go to the UI to start a workflow - WorkflowTriggeredByUI.
When this workflow ends, another workflow WorkflowTriggeredByEvent starts automatically
…ample-app' into APP-6781-event-based-workflows-sample-app
|
|
||
| "produces": [ | ||
| { | ||
| "eventId": "WorkflowTriggeredByEventCompleted", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets change this to something other then WorkflowTriggeredByEventCompleted,
Workflow events will be produced by default
This is not self explanatory
Lets change the event name to AssetUpdateEvent, and something similar in event id
and add a comment
All workflow events will be produced by default and not needed to be added here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, should I remove this entirely then? Since this workflow doesn't produce any event.
| # Initialize the application | ||
| application = BaseApplication( | ||
| name=APPLICATION_NAME, | ||
| application_manifest=application_manifest, # Optional, if the manifest has event registration, it will be bootstrapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this optional ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the application manifest optional for now since we are only using it for event subscriptions, and event subscriptions are optional
Changelog
Additional context (e.g. screenshots, logs, links)
Checklist