Add delete option on these. I think the methods are in hREA. I expect, but don't know, that there isn't validation. If there is, great!
Suggest in addition to the mutation, a method deletable which is a boolean. The delete mutation can then check if it can delete with that method. Also, it can be called from the UI, so the UI can display the delete button only if the object is in fact deletable.
Validation definitions are here. But I'm including the specifics below.
Agent:
deletable: only if no flows or processes reference the agent as provider or receiver, nothing references the agent as inScopeOf,the agent is not proposedTo and no economic resources reference the agent as the primaryAccountable; if only agent relationships reference the agent, then cascade the delete to the relationships or require the agent relationships to be deleted first
ResourceSpecification:
deletable: only if there are no related recipe resources, intents, economic resources, economic events, commitments, claims
Add delete option on these. I think the methods are in hREA. I expect, but don't know, that there isn't validation. If there is, great!
Suggest in addition to the mutation, a method
deletable
which is a boolean. Thedelete
mutation can then check if it can delete with that method. Also, it can be called from the UI, so the UI can display the delete button only if the object is in fact deletable.Validation definitions are here. But I'm including the specifics below.
Agent:
deletable
: only if no flows or processes reference the agent as provider or receiver, nothing references the agent as inScopeOf,the agent is not proposedTo and no economic resources reference the agent as the primaryAccountable; if only agent relationships reference the agent, then cascade the delete to the relationships or require the agent relationships to be deleted firstResourceSpecification:
deletable
: only if there are no related recipe resources, intents, economic resources, economic events, commitments, claimsProposal:
deletable
: always trueDeletion should cascade to the ProposedIntents