예제 #1
0
 def test_respond_decision_task_completed(self):
     request = RespondDecisionTaskCompletedRequest()
     request.task_token = "{}"
     request.identity = "123@localhost"
     response, err = self.service.respond_decision_task_completed(request)
     self.assertIsNotNone(err)
     self.assertIsNone(response)
     self.assertRegex(str(err), "Domain not set")
예제 #2
0
 def respond_decisions(self, task_token: bytes, decisions: List[Decision]):
     service = self.service
     request = RespondDecisionTaskCompletedRequest()
     request.task_token = task_token
     request.decisions.extend(decisions)
     request.identity = WorkflowService.get_identity()
     # noinspection PyUnusedLocal
     response: RespondDecisionTaskCompletedResponse
     response, err = service.respond_decision_task_completed(request)
     if err:
         logger.error("Error invoking RespondDecisionTaskCompleted: %s", err)
     else:
         logger.debug("RespondDecisionTaskCompleted: %s", response)