Skip to content

Commit

Permalink
Create new json data stores
Browse files Browse the repository at this point in the history
  • Loading branch information
jbirddog committed Dec 19, 2023
1 parent 50da031 commit d04f95a
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ def _data_store_location_for_task(spiff_task: SpiffTask, name: str) -> str | Non
class JSONDataStore(BpmnDataStoreSpecification, DataStoreCRUD): # type: ignore
"""JSONDataStore."""

@staticmethod
def create_instance(name: str, identifier: str, location: str, schema: dict[str, Any], description: str | None):
model = JSONDataStoreModel(
name=name,
identifier=identifier,
location=location,
schema=schema,
description=description,
data={},
)
db.session.add(model)
db.session.commit()

@staticmethod
def existing_data_stores() -> list[dict[str, Any]]:
data_stores = []
Expand Down

0 comments on commit d04f95a

Please sign in to comment.