Esempio n. 1
0
    def references_parent_case(self):
        for crierion in self.memoized_criteria:
            definition = crierion.definition
            if isinstance(definition, ClosedParentDefinition):
                return True
            elif (isinstance(definition, MatchPropertyDefinition)
                  and property_references_parent(definition.property_name)):
                return True

        for action in self.memoized_actions:
            definition = action.definition
            if isinstance(definition, UpdateCaseDefinition):
                for property_definition in definition.get_properties_to_update(
                ):
                    if property_references_parent(property_definition.name):
                        return True
                    if (property_definition.value_type
                            == UpdateCaseDefinition.VALUE_TYPE_CASE_PROPERTY
                            and property_references_parent(
                                property_definition.value)):
                        return True
            elif isinstance(definition,
                            CreateScheduleInstanceActionDefinition):
                if (property_references_parent(
                        definition.reset_case_property_name)
                        or property_references_parent(
                            definition.start_date_case_property)):
                    return True

        return False
Esempio n. 2
0
    def references_parent_case(self):
        if super(TimedSchedule, self).references_parent_case:
            return True

        for event in self.memoized_events:
            if isinstance(event, CasePropertyTimedEvent) and property_references_parent(event.case_property_name):
                return True

        return False
Esempio n. 3
0
    def references_parent_case(self):
        if super(TimedSchedule, self).references_parent_case:
            return True

        for event in self.memoized_events:
            if isinstance(event, CasePropertyTimedEvent) and property_references_parent(event.case_property_name):
                return True

        return False
Esempio n. 4
0
    def references_parent_case(self):
        if self.stop_date_case_property_name and property_references_parent(
                self.stop_date_case_property_name):
            return True

        return False