Exemplo n.º 1
0
 def guard_receive_transition(self):
     """Prevent the receive transition from being available:
     - if object is cancelled
     - if any related ARs have field analyses with no result.
     """
     # Can't do anything to the object if it's cancelled
     if not isBasicTransitionAllowed(self):
         return False
     # check if any related ARs have field analyses with no result.
     for ar in self.getAnalysisRequests():
         field_analyses = ar.getAnalyses(getPointOfCapture="field", full_objects=True)
         no_results = [a for a in field_analyses if a.getResult() == ""]
         if no_results:
             return False
     return True
Exemplo n.º 2
0
 def guard_receive_transition(self):
     """Prevent the receive transition from being available:
     - if object is cancelled
     - if any related ARs have field analyses with no result.
     """
     # Can't do anything to the object if it's cancelled
     if not isBasicTransitionAllowed(self):
         return False
     # check if any related ARs have field analyses with no result.
     for ar in self.getAnalysisRequests():
         field_analyses = ar.getAnalyses(getPointOfCapture='field',
                                         full_objects=True)
         no_results = [a for a in field_analyses if a.getResult() == '']
         if no_results:
             return False
     return True
Exemplo n.º 3
0
 def guard_cancel_transition(self):
     if not isBasicTransitionAllowed(self):
         return False
     return True
Exemplo n.º 4
0
 def guard_reinstate_transition(self):
     if not isBasicTransitionAllowed(self):
         return False
     return True
Exemplo n.º 5
0
 def guard_cancel_transition(self):
     if not isBasicTransitionAllowed(self):
         return False
     return True
Exemplo n.º 6
0
 def guard_reinstate_transition(self):
     if not isBasicTransitionAllowed(self):
         return False
     return True