Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support observing changes (at least to model) #302

Open
mwhipple opened this issue Jun 6, 2024 · 0 comments
Open

Support observing changes (at least to model) #302

mwhipple opened this issue Jun 6, 2024 · 0 comments

Comments

@mwhipple
Copy link

mwhipple commented Jun 6, 2024

Description

Currently scripts/plugins seem to be applied to the current state and therefore need to be run at appropriate time(s), but it could be valuable to define behaviors that should work across time to avoid that sequencing and enable easier reuse (i.e. defining such behavior in a base workspace). For example some basic pseudo code of:

!script kotlin {
  workspace.model.onElementAdded { el ->
    if (el is com.structurizr.model.GroupableElement) el.addTags(el.group)
  }
}

Support for adding would seem helpful since it would presumably work with the DSL but I'm not sure about practical use for observing other types of changes since they would presumably be done programmatically anyway.
Adding this on Model seems valuable, I could imagine it being useful on ViewSet (not sure about any others).

Priority

I'm willing to add this feature myself and raise a PR (please confirm approach first)

More information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant