@@ -31,10 +31,13 @@ type RouteData struct {
3131}
3232
3333type TaskStartEvent struct {
34- Id string `json:"id"`
35- SessionId string `json:"sessionId"`
36- EntryPoint string `json:"entryPoint"`
37- Input TaskInput `json:"input"`
34+ Id string `json:"id"`
35+ SessionId string `json:"sessionId"`
36+ TenantId string `json:"tenantId"`
37+ ServiceName string `json:"serviceName"`
38+ PartitionKey string `json:"partitionKey"`
39+ EntryPoint string `json:"entryPoint"`
40+ Input TaskInput `json:"input"`
3841}
3942
4043type TaskCompleteEvent struct {
@@ -239,7 +242,8 @@ func runTask(ctx context.Context, event any) (evt *TaskCompleteEvent) {
239242 config : appConfig ,
240243 }
241244
242- println (fmt .Sprintf ("client: exec workflow %s with session id %s" , it .EntryPoint , it .SessionId ))
245+ println (fmt .Sprintf ("client: service %s exec workflow %s with session id %s" , it .ServiceName ,
246+ it .EntryPoint , it .SessionId ))
243247 ret , err = service .ExecuteWorkflow (workflowCtx , it .EntryPoint , inputObj )
244248 } else {
245249 srvCtx := ServiceContext {
@@ -249,7 +253,8 @@ func runTask(ctx context.Context, event any) (evt *TaskCompleteEvent) {
249253 config : appConfig ,
250254 }
251255
252- println (fmt .Sprintf ("client: exec service %s with session id %s" , it .EntryPoint , it .SessionId ))
256+ println (fmt .Sprintf ("client: service %s exec handler %s with session id %s" , it .ServiceName ,
257+ it .EntryPoint , it .SessionId ))
253258 ret , err = service .ExecuteService (srvCtx , it .EntryPoint , inputObj )
254259 }
255260
@@ -276,15 +281,15 @@ func runTask(ctx context.Context, event any) (evt *TaskCompleteEvent) {
276281 return errorToTaskComplete (ErrBadRequest )
277282 }
278283
279- workflowCtx := WorkflowContext {
284+ apiCtx := ApiContext {
280285 ctx : ctx ,
281286 sessionId : it .SessionId ,
282287 serviceClient : serviceClient ,
283288 config : appConfig ,
284289 }
285- wkfCtx := context .WithValue (ctx , "polycode.context" , workflowCtx )
290+ newCtx := context .WithValue (ctx , "polycode.context" , apiCtx )
286291
287- req , err := ConvertToHttpRequest (wkfCtx , it .Request )
292+ req , err := ConvertToHttpRequest (newCtx , it .Request )
288293 if err != nil {
289294 println ("client: failed to convert api request" )
290295 return errorToTaskComplete (err )
0 commit comments