Hi, The JIRA below is mentioned as Fixed, but I am having some problems after copying the fix into my version of Sculptor. I made the change in the metamodel to add the "serviceDependencies" collection to Service. Then I copied in the other code changes.
I have this in the design file: Service FooService { } Service SalesOrderAdminService { > @FooService } When I generate, I get: 16766 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component generator of type org.openarchitectureware.xpand2.Generator: EvaluationException : Ambiguous operations String getServiceapiPackage(Module module) and String getServiceapiPackage(Service service) for param types [Void] extensions::helper.ext[2932,36] on line 69 'getServiceapiPackage(service.module)' I added some debugging statements to the Service template's serviceImplBase definition, like so: «debugTrace("Inside Service Template")» «debugTrace("Service name: " + this.name)» «FOREACH getDelegateServices() AS delegateService » «debugTrace("Delegate service name: " + delegateService.name)» «debugTrace("Delegate service's module name: ")» «debugTrace(delegateService.module.name)» /** The «delegateService.name». */ protected «getServiceapiPackage(delegateService)».I«delegateService.name» «delegateService.name.toFirstLower()»; «ENDFOREACH» The output that I get is: Inside Service Template Service name: SalesOrderAdminService Delegate service name: FooService Delegate service's module name: null I tried the trick to transform the module by putting this in DslTransformation.ext: create sculptormetamodel::Service this transform(DslService service) : setModule(((DslModule) service.eContainer).transform()) -> setDoc(service.doc) -> setName(service.name) -> operations.addAll(service.operations.transform()); However, that still doesn't make any difference. For some reason oAW debugging is broken again in my environment, so this is particularly frustrating to resolve. Another problem is that when I delegate to a Service defined in an imported design file like this: Service SalesOrderAdminService { > @InheritanceService } I get the message: "11110 ERROR WorkflowRunner - Not allowed to delegate to Manager in another Module; delegate to a Service instead. [sculptormetamodel.impl.servicei...@8f9138 (name: InheritanceService, doc: null) (otherDependencies: [])] " I've been beating on this for a while now but haven't been able to figure it out. I want to find out if there's something wrong with my modified version of Sculptor. I really don't think that I modified the Service stuff enough to cause problems, but it can happen. Do these use cases work in the pristine Sculptor? If you're too busy to test it, then can you tell me which project has the unit test for this feature? Or is there a particular project that you recommend I edit to test this quickly? Maybe one of the example projects. Thanks! --Polly Patrik Nordwall wrote: > > This is: http://www.fornax-platform.org/tracker/browse/CSC-189 > > Until we fix the issue you can add a delegating method, which will inject > the service and provide a method you can use from your hand written code > in bookDocument. > > > Service Accounting { > > bookDocument(@AccDocument document); > protected scriptMethod => @ScriptService.scriptMethod; > } > > /Patrik > > -- View this message in context: http://www.nabble.com/Injecting-Service-to-Service-tp20681974s17564p21338643.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer