def remove(self): from pyclaim.domain.aggregates.resource.model.resource import Resource from pyclaim.domain.aggregates.user.model.user import User claim_type_writer.delete(self._id) # todo: caution = eventual consistency rules in ddd violated we must call them by using messaging patterns - hooman User.claim_remove_by_claim_type(self._id) Resource.claim_remove_by_claim_type(self._id)
def execute(self): User.claim_remove_by_claim_type(self.claim_type_id) return "Done"