Skip to content

Add more/better examples for custom rules to the documentation #1438

Open

Description

@cyril-steimer

The user guide only has one example for an ArchCondition in its section on Creating Custom Rules.

In our project we have made the experience that this example doesn't seem to be optimal:

  • The easiest way to create a condition seems to be implementing a DescribedPredicate and then using ArchConditions.be or ArchConditions.have to convert the predicate to a condition. However, this mechanism seems to be entirely absent from the user guide.
  • Using SimpleConditionEvent.violated means that the condition cannot be inverted using ArchConditions.not. Wouldn't it be better to use new SimpleConditionEvent and pass call.getOrigin().isAnnotatedWith(Secured.class) to the event's conditionSatisfied parameter instead?

Activity

  1. fahadaldajani92 commented on Oct 8, 2026

    @fahadaldajani92

    Would a small user-guide example showing how to turn a DescribedPredicate into a condition with ArchConditions.be or have be useful here? Is anyone already working on that part?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions