File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ from dataclasses import dataclass
2+ from typing import Callable
3+
4+ from cadence .api .v1 .decision_pb2 import Decision
5+ from cadence .client import Client
6+ from cadence .data_converter import DataConverter
7+ from cadence .api .v1 .service_worker_pb2 import PollForDecisionTaskResponse
8+
9+ @dataclass
10+ class WorkflowContext :
11+ domain : str
12+ workflow_id : str
13+ run_id : str
14+ client : Client
15+ workflow_func : Callable
16+ data_converter : DataConverter
17+
18+ @dataclass
19+ class DecisionResult :
20+ decisions : list [Decision ]
21+
22+ class WorkflowEngine :
23+ def __init__ (self , context : WorkflowContext ):
24+ self ._context = context
25+
26+ # TODO: Implement this
27+ def process_decision (self , decision_task : PollForDecisionTaskResponse ) -> DecisionResult :
28+ return DecisionResult (decisions = [])
You can’t perform that action at this time.
0 commit comments