Replies: 2 comments
-
|
You can do this by building your custom strategy, placing the resulting |
Beta Was this translation helpful? Give feedback.
-
|
Thank @simonbrowndotje. Is there anywhere a sample maven or gradle project how to build a plugin? If i understand the docs (https://docs.structurizr.com/dsl/plugins) correctly it is also neccessary to register my plugin with the !plugin keyword. But i assume for my Custom Implied Relationship this is not neccessary. I can just use it as soon as it is in the plugins folder. Or do i need something like that on top? package com.example;
import com.structurizr.Workspace;
public class TestPlugin implements StructurizrDslPlugin {
@Override
public void run(StructurizrDslPluginContext context) {
System.out.println("Registering custom implied relationship strategy");
context.getWorkspace().getModel()
.setImpliedRelationshipsStrategy(new CustomImpliedRelationshipStrategy());
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m looking for guidance on how to use a custom implied relationship strategy together with the Structurizr DSL.
The Java documentation explains how to implement your own strategy:
👉 https://docs.structurizr.com/java/implied-relationships#building-your-own-implied-relationships-strategy
Example from the docs:
What I’m struggling with is:
How can such a custom strategy be used in a .dsl workspace file?
More specifically:
Do I need to create a DSL plugin to register and enable my strategy?
https://docs.structurizr.com/dsl/plugins
Or is it possible to use a DSL script instead?
https://docs.structurizr.com/dsl/scripts
If a plugin is required, what would be the minimal structure needed to expose and enable the strategy for a DSL workspace?
If anyone has an example of:
a small plugin that exposes a custom implied relationship strategy, or
a DSL script that can achieve the same thing,
…I would be really grateful! 🙌
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions