Skip to content

Commit 1a01da5

Browse files
Add activity stubs to generic template
Signed-off-by: fyzanshaik-atlan <[email protected]>
1 parent 30b427f commit 1a01da5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

templates/generic/app/activities.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Any, Dict
2+
13
from app.handler import HandlerClass
24
from application_sdk.activities import ActivitiesInterface
35
from application_sdk.observability.logger_adaptor import get_logger
@@ -11,4 +13,16 @@ class ActivitiesClass(ActivitiesInterface):
1113
def __init__(self, handler: HandlerClass | None = None):
1214
self.handler = handler or HandlerClass()
1315

14-
# Define activities here
16+
@activity.defn
17+
async def get_workflow_args(
18+
self, workflow_config: Dict[str, Any]
19+
) -> Dict[str, Any]:
20+
"""TODO: Process and merge workflow configuration."""
21+
return workflow_config
22+
23+
@activity.defn
24+
async def extract_and_transform_metadata(
25+
self, args: Dict[str, Any]
26+
) -> Dict[str, Any]:
27+
"""TODO: Implement your extraction and transformation logic."""
28+
raise NotImplementedError("Implement this activity")

0 commit comments

Comments
 (0)