feature/M8F-76 initial updates for new templace package import export#39
Open
abilpraju-aot wants to merge 3 commits intoAOT-Technologies:mainfrom
Open
feature/M8F-76 initial updates for new templace package import export#39abilpraju-aot wants to merge 3 commits intoAOT-Technologies:mainfrom
abilpraju-aot wants to merge 3 commits intoAOT-Technologies:mainfrom
Conversation
auslin-aot
reviewed
Feb 11, 2026
| """template_files_json: add files JSON column, migrate from bpmn_object_key, drop bpmn_object_key | ||
|
|
||
| Revision ID: b1c2d3e4f5a6 | ||
| Revises: 22aaaa61d8f6 |
Collaborator
There was a problem hiding this comment.
can you please update version in comment to 9f2d0e4c8abc to match actual down_revision = "9f2d0e4c8abc"
| ) # type: ignore | ||
| visibility: str = db.Column(db.String(20), nullable=False, default=TemplateVisibility.private.value) | ||
| bpmn_object_key: str = db.Column(db.String(1024), nullable=False) | ||
| files: list[dict] | None = db.Column(db.JSON, nullable=True) # [{"file_type": "bpmn"|"json"|"dmn"|"md", "file_name": str}] |
Collaborator
There was a problem hiding this comment.
files column requires at least one bpmn file. Can we make nullable=False
| with open(new_path, "wb") as f: | ||
| f.write(content) | ||
| except (OSError, IOError): | ||
| pass |
Collaborator
There was a problem hiding this comment.
Can we consider logging too incase of exception
| template: TemplateModel, | ||
| file_name: str, | ||
| content: bytes, | ||
| user: UserModel | None = None, |
Collaborator
There was a problem hiding this comment.
user is not used inside the method. Is this intended to update modified_by(template.modified_by = user.username) in the table?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA Ticket
https://aottech.atlassian.net/browse/M8F-76
https://aottech.atlassian.net/browse/M8F-25
Description
Features
/templates/{id}/files,/templates/{id}/files/{file_name}).template.json). Import a template from a ZIP; creates a new version when the key already exists.POST /v1.0/m8flow/process-models/{model_id}/export-as-templateto save a process model as a template (frontend uses the correct base path).Backend
get_bpmn/store_bpmnto the template storage layer (MinIO/Filesystem/Noop) so BPMN-by-key and multi-file flows both work.application/xmlbody + X-Template-* headers and (2)multipart/form-datawith form fields and optional files. OpenAPI spec updated for both.bpmn_object_keyis now nullable; migration addsprimary_file_nameandfile_list_cached(no column drop). Template model and AuditDateTimeMixin aligned (modified_atused correctly).{file_name, size}from the create flow. Import-from-ZIP response returns camelCasetemplateKey. Template file cache buildsTemplateFilewithmodified_atasdatetime. Connexion: extension src added tosys.pathandspecification_dirpassed when registering the merged spec; pre-validate import oftemplates_controllerso path/import errors surface at startup.Frontend
/v1.0/m8flow/process-models/...).Type
Changes
Testing
Related Issues
Closes #