@@ -22,9 +22,9 @@ type Service interface {
2222	GetDescription (method  string ) (string , error )
2323	GetInputType (method  string ) (any , error )
2424	GetOutputType (method  string ) (any , error )
25+ 	IsWorkflow (method  string ) bool 
2526	ExecuteService (ctx  ServiceContext , method  string , input  any ) (any , error )
2627	ExecuteWorkflow (ctx  WorkflowContext , method  string , input  any ) (any , error )
27- 	IsWorkflow (method  string ) bool 
2828}
2929
3030func  RegisterService (service  Service ) {
@@ -103,12 +103,9 @@ func loadAppConfig() AppConfig {
103103}
104104
105105func  sendStartApp () {
106- 	var  services  []ServiceDescription 
107- 	for  name  :=  range  serviceMap  {
108- 		services  =  append (services , ServiceDescription {
109- 			Name : name ,
110- 			// ToDo: Add task info 
111- 		})
106+ 	services , err  :=  ExtractServiceDescription ()
107+ 	if  err  !=  nil  {
108+ 		log .Fatalf ("client: %s\n " , err .Error ())
112109	}
113110
114111	req  :=  StartAppRequest {
@@ -118,7 +115,6 @@ func sendStartApp() {
118115		Routes :   loadRoutes (),
119116	}
120117
121- 	var  err  error 
122118	for  {
123119		err  =  serviceClient .StartApp (req )
124120		if  err  ==  nil  {
@@ -171,27 +167,6 @@ func runService(ctx context.Context, taskLogger Logger, event ServiceStartEvent)
171167		return  ErrorToServiceComplete (err2 )
172168	}
173169
174- 	if  event .Method  ==  "@DescribeMethod"  {
175- 		inputObj  :=  DescribeMethodRequest {}
176- 		err  =  ConvertType (event .Input , & inputObj )
177- 		if  err  !=  nil  {
178- 			err2  :=  ErrServiceExecError .Wrap (err )
179- 			taskLogger .Error ().Msg (err2 .Error ())
180- 			return  ErrorToServiceComplete (err2 )
181- 		}
182- 
183- 		fmt .Printf ("service %s describing method %s" , event .Service , inputObj .Name )
184- 		description , err  :=  GetMethodDescription (service , inputObj .Name )
185- 		if  err  !=  nil  {
186- 			err2  :=  ErrServiceExecError .Wrap (err )
187- 			taskLogger .Error ().Msg (err2 .Error ())
188- 			return  ErrorToServiceComplete (err2 )
189- 		}
190- 
191- 		evt  =  ValueToServiceComplete (description )
192- 		return 
193- 	}
194- 
195170	meta  :=  ServiceMeta {
196171		IsWorkflow : service .IsWorkflow (event .Method ),
197172	}
0 commit comments