Skip to content
Snippets Groups Projects
Commit b8e8f10b authored by Simon Spinner's avatar Simon Spinner
Browse files
parents bb2ea4a7 4944f21e
No related branches found
No related tags found
No related merge requests found
......@@ -325,7 +325,7 @@ public class ModelExtractionService implements Service<ModelExtractionService> {
}
RepositoryComponentTemplate<?> callerComponent = implementationComponent;
// 4. Now add the called component (if applicable)
// 4. Now add the called component (if applicable)
InterfaceProvidingRoleTemplate calledProvidingRole = null;
RepositoryComponentTemplate<?> calledComponent = null;
boolean isRemoteCall = false;
......@@ -342,6 +342,7 @@ public class ModelExtractionService implements Service<ModelExtractionService> {
// 5. Now wrap the implementation in a composite component (if necessary)
CompositeComponentTemplate compositeComponent = createCompositeComponent(repository, incomingCrec, callerComponent);
if (compositeComponent != null) {
// Create an assembly context for embedding the component and connect its interface providing role with a role on the composite component
AssemblyContextTemplate assembly = compositeComponent.defineAssemblyContext(incomingCrec.getComponentName(), implementationComponent);
......@@ -374,9 +375,9 @@ public class ModelExtractionService implements Service<ModelExtractionService> {
}
// 6. Now create the assembly contexts
AssemblyContextTemplate callerContext = system.defineAssemblyContext(incomingCrec.getComponentName(), callerComponent);
AssemblyContextTemplate callerContext = system.defineAssemblyContext(callerComponent.getName(), callerComponent);
if (callerRequiringRole != null) {
AssemblyContextTemplate calledContext = system.defineAssemblyContext(outgoingCrec.getComponentName(), calledComponent);
AssemblyContextTemplate calledContext = system.defineAssemblyContext(calledComponent.getName(), calledComponent);
system.defineAssemblyConnector(callerContext, callerRequiringRole, calledContext, calledProvidingRole);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment