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

Automate toolkit #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jezzsantos
Copy link

@jezzsantos jezzsantos commented Jun 13, 2022

Added a first version of an automate toolkit to create new sub-domains, and usecases.

Please see the included README.md (in this PR) for how it was designed and built.

@jezzsantos
Copy link
Author

jezzsantos commented Jun 13, 2022

The README.md tells the story of how the toolkit was built.

However, if you just want to see it working, then do this:

  1. Install automate: dotnet tool install --global automate --version 0.2.3-preview

Now run the existing toolkit.

  1. Make sure you are in the ddd-forum folder
  2. To create the new (pre-configured) sub-domain, inappropriately named: 'aDomain' with an aggregate called 'AnAggregate', with two use-cases, one for 'CreateAnAggregate' and another for 'GetAnAggregate', runt his command: automate execute command "Go"

If you want to change the names of the subdomain, aggregate and usecases, then you will need to edit the existing draft definition.

You can view the current draft configuration automate view draft

You can edit the values of things in this draft, for example:

automate configure on "{SubDomain}" --and-set "Name=AnotherSubDomain"
automate configure on "{SubDomain.Resource.N79CgPEB}" --and-set "Name=AnotherAggregate" --and-set "Kind=aggregate"
automate configure on "{SubDomain.Resource.N79CgPEB.UseCase.rUFr3GmX}" --and-set "Name=AnotherActionName" --and-set "Route=/anotherroute" --and-set "Kind=command"

OR you can build your own new draft, for another SubDomain, Aggregates/Entitites and UseCases of your own:

automate run toolkit "SubDomain" --name "sample2"
automate configure on "{SubDomain}" --and-set "Name=Plantation"
automate configure add-one-to "{SubDomain.Resource}" --and-set "Name=Bananas" --and-set "Kind=aggregate"
automate configure add-one-to "{SubDomain.Resource.<RESOURCEID>.UseCase}" --and-set "Name=Create" --and-set "Kind=command" --and-set "Route=/"

@jezzsantos
Copy link
Author

There are a few design details left to discuss, before this might be done, that might need to be improved.
Let's do that over in https://discord.gg/vpc3gDPR

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

Successfully merging this pull request may close these issues.

1 participant