You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2022/07/26 02:19:42 UTC

[GitHub] [openwhisk-runtime-dotnet] ningyougang commented on pull request #65: Support array result include sequence action

ningyougang commented on PR #65:
URL: https://github.com/apache/openwhisk-runtime-dotnet/pull/65#issuecomment-1194897763

   Steps of test `support sequence action`
   * Write Split.cs and Sort.cs
   ```c#
   using System;
   using Newtonsoft.Json.Linq;
   
   namespace Apache.OpenWhisk.Example.Dotnet
   {
       public class Split
       {
           public JArray Main(JObject args)
           {
               JArray jarray = new JArray();
               jarray.Add("e1");
               jarray.Add("e2");
               // use Jarray param as next action's input param
               return (jarray);
           }
       }
   }
   
   using System;
   using Newtonsoft.Json.Linq;
   
   namespace Apache.OpenWhisk.Example.Dotnet
   {
       public class Sort
       {
           public JArray Main(JArray args)
           {
               // Don't do real sort operation, just return Jarray direclty, don't do real split operation
               return (args);
           }
       }
   }
   ```
   * Create the action and invoke it
   refer to: https://oss.navercorp.com/lambda/lambda/blob/master/docs/actions-dotnet.md
   ```
   wsk -i action update /whisk.system/utils/splitDotNet splitDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Split::Main --kind dotnet:2.2
   wsk -i action update /whisk.system/utils/sortDotNet sortDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Sort::Main --kind dotnet:2.2
   wsk -i action create mySequence-dotnet --sequence /whisk.system/utils/splitDotNet,/whisk.system/utils/sortDotNet 
   wsk -i action invoke --result mySequence-dotnet -r -v
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org