Propositional-Logic Typing - Developing a Logic System for ...
Logic Apps と Api Apps の話
-
Upload
sunao-tomita -
Category
Technology
-
view
986 -
download
7
Transcript of Logic Apps と Api Apps の話
GABCLogic Appsと API Appsの話
Japan Azure User Group
Microsoft MVP for Microsoft Azure
冨田 順 (とみたすなお)
http://twitter.com/harutama
使うもの
• Microsoft Azure–アカウント持ってるよねっ!!!
– 1ヶ月無料評価版もどうぞhttp://azure.microsoft.com/ja-jp/pricing/free-trial/
• Visual Studio– Community でも問題なく使えます。
• Microsoft Azure SDK 2.5.1–現状での最新版を入れてください。
(最新じゃないと API Apps や Logic Apps に対応していません)
3
一発でインストールできます
4
Microsoft Web Platform Installer 5.0
http://www.microsoft.com/web/downloads/platform.aspx
これは何ですか?
• アプリケーションを 50 以上の人気の SaaS
API に公開し、組織で API を共有
– SaaS およびエンタープライズアプリケーションとの統合。
–選択した言語でのクライアントプロキシまたは API の生成。
– API アプリのバージョン管理と展開の自動化。
– Active Directory、シングルサインオン、および OAuth による API の保護。
–組織のギャラリーによる API の社内共有。
6
これは何ですか?
• ロジックアプリを使用すると、強力な統合ソリューションを簡単な操作により開発および配信できます。
–ビジュアル操作によりビジネスプロセスおよびワークフローを作成する。
– Web、モバイル、および API のアプリで統合機能を配信する。
– SaaS およびエンタープライズアプリケーションと統合する。
– EAI/B2B およびビジネスプロセスを自動化する
–オンプレミスのデータに接続する。13
Logic Appsのコンセプト
• ワークフロー
–一連のワークフローが組み合わされたビジネスプロセスをグラフィカルに表現。
• コネクター
–コネクターは特殊な API アプリケーション。データを繋げたいときに使うもの。
• トリガー
–ワークフローの中のイベント。メールが届いたとか
15
http://azure.microsoft.com/en-us/documentation/articles/app-service-logic-
what-are-logic-apps/
apiapp.jsonがメタデータ
27
{"$schema": "http://json-schema.org/schemas/2014-11-01/apiapp.json#","id": "WebApplication1","namespace": "microsoft.com","gateway": "2015-01-14","version": "1.0.0","title": "WebApplication1","summary": "","author": "","endpoints": {
"apiDefinition": "/swagger/docs/v1","status": null
}}
ところが…
28
APIアプリは、.NET、Node.js、PHP、Python、Javaなど、Webアプリがサポートできる任意のテクノロジをサポートできます。APIアプリを構築、デプロイした際に、舞台裏では、我々があなたのためにWebアプリを作成し、それがAPIアプリであることを示す特殊ないくつかのメタデータを配置しています。また、APIアプリは、apiapp.jsonという特殊なファイルを、ルートに持つ必要があります。このファイルには、作者、概要、IDといった、APIアプリ関連のメタデータが含まれています。これらのメタデータは、現在のプレビューでは使われていませんが、今後活用される予定です。
https://satonaoki.wordpress.com/2015/04/02/azure-api-apps-detail-faq/
いまのところ
30
AppStart/SwaggerConfig.cs の中身
// In contrast to WebApi, Swagger 2.0 does not include the query string component when mapping a URL// to an action. As a result, Swashbuckle will raise an exception if it encounters multiple actions// with the same path (sans query string) and HTTP method. You can workaround this by providing a// custom strategy to pick a winner or merge the descriptions for the purposes of the Swagger docs ////c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());// ***** Uncomment the following to enable the swagger UI *****
}).EnableSwaggerUi(c =>
{
// Use the "InjectStylesheet" option to enrich the UI with one or more additional CSS stylesheets.// The file must be included in your project as an "Embedded Resource", and then the resource's// "Logical Name" is passed to the method as shown below.////c.InjectStylesheet(containingAssembly, "Swashbuckle.Dummy.SwaggerExtensions.testStyles1.css");
SwaggerConfig.cs の中にある UI を有効にする部分のコメントを外す。(大きいファイルなので “EnableSwaggerUi” で検索した方がいいです)
Web UI が有効になります
31
デバッグで動作させて http://localhost/swagger/にアクセスすると自動的に作られたメタデータをいい感じに見ることができます。これを動かしておくと、Logic App から API が見えます。
API Apps
• Azure App Service API Appsの詳細とFAQ
https://satonaoki.wordpress.com/2015/04/02/azure-api-
apps-detail-faq/
• Azure App Serviceでの.NETではないAPIアプリの実行
https://satonaoki.wordpress.com/2015/04/03/non-dotnet-
api-app-app-service/
34
Logic Apps
• Azure Logic App with simple API App with inputs and
outputs
http://blogs.msdn.com/b/hosamshobak/archive/2015/03/3
1/logic-app-with-simple-api-app-with-inputs-and-
outputs.aspx
• Azure API Apps を Node.js で作って Logic Apps で使う
https://r2.ag/azure-api-apps-with-node-js/
• Logic Apps で JavaScript を実行したい!
https://r2.ag/azure-javascript-processor-api-app/
35