def start(self, **kwargs):
    if (not self.instance.started_at):
        self.instance.started_at = timezone.now()
    self.instance.status = self.instance.STATUS_STARTED
    self.instance.save()
    predecessor_names = {instance.activity_name for instance in self.instance.predecessors.all()}
    if self._wait_for.issubset(predecessor_names):
        self.finish()
def start(self, **kwargs):
    if (not self.instance.started_at):
        self.instance.started_at = timezone.now()
    self.instance.status = self.instance.STATUS_STARTED
    self.instance.save()
    predecessor_names = {instance.activity_name for instance in self.instance.predecessors.all()}
    if self._wait_for.issubset(predecessor_names):
        self.finish()