rabbah commented on a change in pull request #3256: Refactor some bits of the 
triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167063189
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##########
 @@ -305,59 +292,56 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   private def activateRules(user: Identity,
                             args: JsObject,
                             rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
-    implicit transid: TransactionId): Iterable[Future[JsObject]] = {
-    rulesToActivate.map {
+    implicit transid: TransactionId): Future[Iterable[RuleActivationResult]] = 
{
+    val ruleResults = rulesToActivate.map {
       case (ruleName, rule) =>
         // Invoke the action. Retain action results for inclusion in the 
trigger activation record
-        val actionActivationResult: Future[JsObject] = postActivation(user, 
rule, args)
+        postActivation(user, rule, args)
           .flatMap { response =>
             response.status match {
               case OK | Accepted =>
                 Unmarshal(response.entity).to[JsObject].map { 
activationResponse =>
-                  val activationId: JsValue = 
activationResponse.fields("activationId")
+                  val activationId = 
activationResponse.fields("activationId").convertTo[ActivationId]
 
 Review comment:
   OK - sold ? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to