Logic Apps: CI/CD Part 1- Building your Logic App

Logic Apps: CI/CD Part 1- Building your Logic App

Continuous Integration/Continuous Delivery is a development practice that enables you to accelerate your deployments and delivery time to the customer, by reliably releasing software at any time and without manual intervention.

For this post series, I will explain how to enable this practice, oriented to Logic Apps and Azure Pipelines.

We will start by Building the Logic App, using Visual Studio. I will not approach Logic Apps Preview, because since it’s still a preview feature, many changes can happen and render all this useless.

As you may know, to create Logic Apps in Visual Studio, there are a few requirements, such as:

  • Visual Studio 2015, 2017, 2019 or greater, if available
  • Azure SDK
  • Azure Logic Apps Tools for Visual Studio Extension (if using VS)
  • An active Azure subscription
  • Time, will and patience.

After you have all this installed, you can begin to create and let your creativity flow!

We’ll start from scratch. Open you VS and start a new Project, by selecting the Azure Resource Group C# template and the Logic App template after that.

You will end with a new Project, and Solution if it’s the case, with 3 files. The PowerShell file is the deployment script that VS uses to automate the ARM deployment. Only in a special case do you need to fiddle with this file.

The other two files are the Logic App code and the Parameters file. You will need to create a new one, to be used as a Template for the Azure Pipeline. So go ahead and copy the Parameters file and change the name to LogicApp.parameters.template.json .

You should end with something like this.

This Parameters Template file will contain our Tokens, which will be replaced in the Pipeline using the “Replace Tokens” Task. In the coming posts, I will explain how it works and why we’re using it.

For the sake of simplicity, I’ll just use the Service Bus connector, where depending on the input, I’ll send a message to the Queue with the provided information.

After creating the connection, you will see that, in the back code, several parameters and a Resource node were created as well, that contain the link and inputs for this connection.

Even when working in a single Resource Group, it is a good practice to prepare this for CI CD, because even though it’s static, connections change and instead of having to re-do all of it, you just need to re-deploy the pipeline with the new configurations.

We will not be making any changes to the Resource node, but to the action path and parameters. This will define that instead of having a fixed value, it will point to the parameter itselft, making it possible to have an ARM parameter configurable in the Pipeline.

The post Logic Apps: CI/CD Part 1- Building your Logic App appeared first on SANDRO PEREIRA BIZTALK BLOG.

Revisiting “The Get-AzLogicApp command was not found”?

Revisiting “The Get-AzLogicApp command was not found”?

Last week, when preparing for a deployment, I bumped into this error again. As from my previous post, it could be easily fixed with a PowerShell module install.

You can review it here: https://www.linkedin.com/pulse/get-azlogicapp-command-found-pedro-almeida/?trackingId=LYhay%2BdvR7ieQ0XnCy9q0Q%3D%3D

But this time, the script was already fixed. Nothing had changed, as far as I knew. The last build and publish was in September, no errors there.

So what happened that killed my build?

It couldn’t be the Az module updates, because we were forcing the version. There had been several updates, so could this be it?

I tried to force a newer version, like 2.0.0, but still failed to execute the command. I even restricted the script to use only the command I needed, that was the CallbackUrl.

After a few other failures, my thinking was, “this can’t be the problem, the script was executing without issues, so it has to be something else.”

So I took another look at my pipeline. It was the same as before… Azure Powershell task to remove AzureRM, install Az module and Azure CLI task to execute the scri… wait!

Could this be the problem?

I switched the tasks and re-queued the pipeline.

And success! No more errors.

Azure CLI has received some updates in the past weeks, and the build I had before was 2.0.16 (Core 2.11.0) compared to 2.1.0 (Core 2.18.0) was running in these failed pipeline runs.

I looked into the Azure CLI release notes, but found nothing referring the LogicApp commands or Az.LogicApps.

This time, I can’t find a proper explanation for this error, but I’m suspecting some update broke the ability to run these Az module commands with Azure CLI or the Az.LogicApps commands specifically.

The post Revisiting “The Get-AzLogicApp command was not found”​ appeared first on SANDRO PEREIRA BIZTALK BLOG.

LogicApp – ServiceBus connector issue with the custom message header properties treating all properties key value pairs as strings

LogicApp – ServiceBus connector issue with the custom message header properties treating all properties key value pairs as strings

Hi All,

Recently I found that there is an issue with the Service Bus connector sending custom message header to the topics/subscription. The issue is the connector treat the text as string in spite of providing numeric or boolean values.

According to the below link

If the content is true or false (case-sensitive!), then the broker treats it as a System.Boolean with the corresponding value.

If the content can be parsed as an integer, then the broker treats it as a System.Int64. 

https://docs.microsoft.com/en-us/rest/api/servicebus/message-headers-and-properties#message-properties

I’ve raised this with Microsoft.

I have got an update from the Microsoft Logic App product group acknowledging it as a bug fix of Service Bus connector treating all properties key value pairs as strings and they are actively working on it. The fix might be available in next year Jan.

Thanks.

Shadab

Global Integration Boot camp – a great success story

Global Integration Boot camp – a great success story

The Microsoft BizTalk Server community is one of the long-standing powerful technical communities in the world I’ve seen in an enterprise segment. For many years community members across the world have done numerous events like user group meetings, community gatherings, innovations days etc. This following LinkedIn statement by Tord Glad Nordahl who works as a Program Manager in BizTalk Server team at Microsoft is a testament to the above statement.

 

Tord Glad Nordahl

 

What is Global Integration Boot camp?

The idea of Global Integration Boot camp is pretty simple, uniting all the community members in the Microsoft Integration space across the world and conduct a one-day event on the same day.

Beginning of this year a group of people in the community along with Microsoft decided to go ahead with the plan. Hence the birth of Global Integration Boot camp (GIB).

The date was fixed to March 25th 2017 for the first GIB and a Slack group was set up for the core organizers to communicate. As you can see from the below screen shot from Slack there are 61 members in the group who worked behind the scene to make this event a great success.

Global Integration Bootcamp

Out of that 61 people, there are few outstanding contributors (core organising team) whom I wanted to personally acknowledge and thank for their relentless work behind the scene to make this event a grand success Eldert Grootenboer, Sven Van den brande, Rob Fox, Bill Chesnut, Martin Abbott, Dan Toomey, Glenn Colpaert, Lex Hegt, Steef-Jan Wiggers, Wagner Silveira, and all those people who contributed to GIB.

The format of the event is to have 3 to 4 sessions followed by a lab exercise in each location. The session and labs are focused on the following technology stack (all related to Integration)

BizTalk 2016 : BizTalk Server 2016, what’s new, and using the new Logic Apps adapter
Logic Apps : Creating Logic Apps using commonly-used connectors
Service Bus : Build reliable and scalable cloud messaging and hybrid integration solutions
Enterprise Integration Pack : Using the Enterprise Integration Pack (EIP) with Logic Apps
API Management : How does API management help you organize and secure your APIs
On-Premise Gateway : Connecting to on-prem resources using the On-Premise Gateway
Hybrid Integration : Hybrid integrations using BizTalk Server and Logic Apps
Microsoft Flow : Learn to compose flows with Microsoft Flow

Welcome message from Microsoft Product Group

The Microsoft Product Group from Seattle Jim Harrer, Jon Fancey, Tord Glad Nordahl, Kevin Lam, Jeff Hollan, Darek Li has put together this short intro video to GIB

What are the challenges?

Anything you do for the first time is going  to raise a great deal of scepticism whether something like this will work? The organisers did a great job of convincing people across different countries, the list started off some 5-6 countries initially and gradually expanded as the event got the moments. For example  a couple of locations were added just 2 or 3 weeks before the event date.

The second biggest challenge was securing venues at different places. In majority of the countries the event was conducted at Microsoft venues and in some places the partner organisations provided the space. It’s not just the space, for a whole day event like this there are a lot of logistics need to be addressed like food, drinks, and in some places security staff etc.

The organizers did an excellent job in addressing these challenges and moving forward seamlessly.

Locations, Organisers, Speakers and Sponsors

Following table summarises all the global locations in total 12 countries and 16 locations. Microsoft played an active role across all the locations in helping local sponsors, organisers to make this event a grand success.

Country Location Organiser Speakers Sponsors
Australia Brisbane
  • Dan Toomey
  • Dan Toomey
  • Ashley Knowles
  • Lee Simpson
  • Mexia
Australia Melbourne
  • Bill Chesnut
  • Bill Chesnut
  • Nathan Fernandez
  • Sonja Bijou
  • Paco de la Cruz
  • Tanvir Chowdhury
  • SixPivot
  • InterprIT
  • Mexia
Australia Sydney
  • Rene Brauwers
  • Rene Brauwers
  • Mick Badran
  • MOQdigital
Belgium Antwerp
  • Sven Van den brande
  • Glenn Colpaert
  • Toon Vanhoutte
  • Steven Van Eycken
  • Glenn Colpaert
  • Jochen Toelen
  • BizTalk User Group
Finland Helsinki
  • Sakari Nahr
  • Karl Ots
  • Karl Ots
  • Sami Ovaska
  • Teemu Tapanila
  • Kompozure
India Bengaluru
  • Arunkumar Kumaresan
  • Sriram Hariharan
  • Deepak Rajendran
  • Tulika Chaudharie
  • Harikharan Krishnaraju
  • Shailesh Agre
  • Shree Divya
  • Sunny Sharma
  • Lohith G Nagaraj
  • Sajith C P
  • Roy Joseph
  • Rekha Kodali
  • BizTalk360
United Kingdom London
  • Saravana Kumar
  • Lex Hegt
  • Nino Crudele
  • Ashwin Prabhu
  • Michael Stephenson
  • Lex Hegt
  • Saffi Ali
  • BizTalk360
  • Codit UK
New Zealand Auckland
  • Wagner Silveira
  • Mark Brimble
  • Wagner Silveira
  • Nikolai Blackie
  • James Corbould
  • Morten Velling
  • Abhishek Kumar
  • Datacom
  • Adaptiv
  • Theta
Netherlands Rotterdam
  • Microsoft Integration User Group
  • Tomasso Groenendijk
  • Rob Fox
  • Eldert Grootenboer
  • Steef-Jan Wiggers
  • Motion10
Norway Oslo
  • Dominic Akadimah
  • Richard Hallgren
  • Communicate Norge
Portugal Porto
  • Sandro Pereira
  • Sandro Pereira
  • Ricardo Torre
  • José António Silva
  • Pedro Sousa
  • João Ferreira
  • Devscope
Spain Madrid
  • Kabel Sistemas
  • Mariano Robles
  • Carlos Sacristan
  • Felix Mondelo
  • Felipe Senso
  • Ivan Canizares
  • Francisco Nieto
  • Kabel Sistemas
Sweden Stockholm
  • Johan Hedberg
  • Johan Hedberg
  • Mattias Lögdberg
  • Mikael Sand
  • Samuel Kastberg
  • Alan Smith
  • Mikael Håkansson
  • BizTalk User Group Sweden
United States Chicago
  • Jaidev Kunjur
  • Jaidev Kunjur
  • Enkay Tech
United States New York
  • Howard Edidin
  • Mandi Ohlinger
  • Howard Edidin
  • Stephen Thomas
  • Kent Weare
  • VNB Consulting
United States Seattle
  • Thomas E. Canter
  • Richard Seroter
  • Kevin Lam
  • Nick Hauenstein
  • Jeff Hollan
  • Phidiax
  • QuickLearn

Interesting Pictures from the event

These pictures shows the depth of the event across various locations 12 countries, 16 locations, 55 speakers and 650+ attendees.

Global Integration Bootcamp - Netherlands Global Integration Bootcamp - Sweden
Global Integration Bootcamp - United Kingdom Global Integration Bootcamp - Finland
Global Integration Bootcamp - Spain Global Integration Bootcamp - Belgium
Global Integration Bootcamp - Portugal Global Integration Bootcamp - India
Global Integration Bootcamp - Norway Global Integration Bootcamp - Chicago
Global Integration Bootcamp - Seattle Global Integration Bootcamp - Australia - Melbourne
Global Integration Bootcamp - Australia - Brisbane Global Integration Bootcamp - New Zealand
Global Integration Bootcamp - New York Global Integration Bootcamp - Australia - Sydney

Missed out on GIB? then don’t miss INTEGRATE 2017

If you have missed out all the fun of GIB 2017, then don’t miss out attending INTEGRATE 2017. It’s bigger in scale, all the Microsoft Product Group team and majority of the speakers who participated at GIB 2017 will be present in a single location in London. The registrations are now open for INTEGRATE 2017 and filling super fast.

The post Global Integration Boot camp – a great success story appeared first on BizTalk360.

Azure Logic Apps–Deleting Items From SharePoint (Online) List

Azure Logic Apps–Deleting Items From SharePoint (Online) List

 I have a scenario at work where we need to provide some simple syncronization between a SQL Azure table and a SharePoint Online Custom List. As a pre-requisite each morning before business users get into the office, we need to purge the contents from the SharePoint list and update it with today’s data + a 6 day forecast of future data.

I have integrated  BizTalk with custom SharePoint Lists in the past, and even wrote about it in one of my books. It wasn’t a particularly good experience so I was interested in evaluating how Logic Apps would deal with custom lists. 

One difference between BizTalk and Logic Apps, in this case, is that BIzTalk has a SharePoint Adapter but it will only interface with SharePoint Document Libraries. If you wanted to integrate BizTalk with SharePoint Custom lists you are likely going to do so with the Lists.asmx web service.  While it is completely possible to use this custom web service approach, be prepared to spend a few hours (if you are lucky) getting everything working.

With Logic Apps, it is a very different experience.  From the Logic Apps canvas you need to add a trigger to kick off your workflow.  In my case, I used a Recurrence trigger that will run every day at 7:45 am.  I can also kick this trigger off manually in the Azure Portal if I wish.

Next, I want to add an action and then search for SharePoint from the Microsoft managed APIs dropdown.  After we do that, all available SharePoint Online operations will be displayed.

In my case, I want to purge all items, but there is no Delete List operation.  Instead, I need to get all items in my list first, so that I can use the ID from each record to delete that item.  In my scenario I expect 7 days * 24 hourly records (168 items) to be in my list at any given time so this load is not a concern.

With this situation in-mind, I will select the Get Items  operation.

Once I have selected my Get Items operation, I need to establish my connection to my Office 365 subscription. (I will spare you from the password prompts)

With my connection established, I now need to provide the URL to my SharePoint List.  I can also specify optional parameters that control the number of items returned. 

I must say the experience in this dialog is a good one.  I can click on the Site URL dropdown and all of the sites that I have access to will be in that list.  Once I have selected my URL and then click on the List Name dropdown, I then see all the lists that I have access to on that site.

Next, I need to add another activity and this time I will select the Delete Item operation.

I have a similar experience in the Delete Item dialog that I had in the Get Items dialog.  With my connection already established, I need to provide the same Site URL  and the same List Name.  What is different this time is I need to provide an ID for the list item that I would like to delete.  In this case it will be an ID  that is coming from my Get Items response.

You might be asking yourself – will how is that going to work for all of my items in my list?  Don’t you need a for loop to iterate through the Get Items collection? The answer is Yes, but the Logic Apps team has made this very simple – they have done the heavy lifting for you.  If you go into Code View you can see it there:

foreach”: “@body(‘Get_items’)[‘value’]”,
“inputs”: {
    “host”: {
        “api”: {
            “runtimeUrl”: “https://logic-apis-westus.azure-apim.net/apim/sharepointonline”
        },
        “connection”: {
            “name”: “@parameters(‘$connections’)[‘sharepointonline’][‘connectionId’]”
        }
    },
    “method”: “delete”,
    “path”: “/datasets/@{encodeURIComponent(encodeURIComponent(string(‘https://SharePointsharepoint.com/sites/HOPOC/Bighorn/SitePages/Home.aspx’)))}/tables/@{encodeURIComponent(encodeURIComponent(string(‘c28b1ea2-e2a0-4faf-b7c2-3eerec21a8b’)))}/items/@{encodeURIComponent(string(item()[‘ID’]))}”
},

Awesome!

The end result is a Logic App that looks like this:

I can now my Logic App from the Azure Portal by clicking on Select Trigger and then recurrence.

I can follow my execution and dive into my Get Items and Delete Items calls.  By inspecting my inbound and outbound traces I can see the exact payloads and HTTP Status codes from the underlying operations.  In this case I was able to delete 300 items in 23 seconds.  For each item in my collection, a Delete Item call is made.

Conclusion

It honestly took me about 10 minutes to figure this out.  Part of the reason why I am writing about this is I know how long this would take with BizTalk. I anticipate it would take at least 3 hours to do this in BizTalk if it was your first time.  So this isn’t a knock against BizTalk, as Logic Apps has been built, IMO, for these lightweight scenarios with little friction.

In the short term I think Microsoft Integration architects and developers will have many opportunities like this one where you can choose one tool or the other.  For me, developer productivity needs to be part of that equation.  Where the systems that you are integrating are hosted will also play a role.  In this case, I am connecting to SharePoint Online and SQL Azure so it also doesn’t make sense, IMO, to route all of this info back on-premises only to go back up to the cloud.

We may also see a Hybrid approach where a BizTalk process can call out to a Logic App where you can take advantage of these new Logic App connectors.  This was something that Microsoft discussed at 2016 Integrate Event in London.

In a future blog post we will talk about the other half of this solution which is how to create items in SharePoint Online from SQL Azure.

Advertisements

Speaking at Integrate 2016

Speaking at Integrate 2016

BizTalk360 has recently released more details on their annual conference in London.  This year there is a name change.  Instead of the BizTalk Summit, the name gets altered to align with the “Integrate” brand.  In case you were not aware, BizTalk360 organized the last Integrate Summit in Redmond back in December 2014 so it makes sense to carry that name forward. BizTalk360 has been working closely with the Microsoft product groups to put on a great event.

This year the summit looks to be better and bigger than ever.  There are more than 20 speakers lined up over 3 days .  The speakers have a variety of backgrounds including Microsoft Product Group, Consultants, Customers, System Integrators and MVPs. There is also an opportunity to hear from the Microsoft’s leadership team and get insight into their plans as it pertains to Azure App Service and Integration.

The session abstracts look great! The topics cover a broad set of technologies that will appeal to integration focused professionals.  The topics include:

  • BizTalk Server 2016
  • Azure Logic Apps
  • Azure App Service
  • Azure Service Bus (Event Hubs and Messaging)
  • Internet of Things (IoT)
  • Azure API Management
  • Azure Stream Analytics
  • Power Bi

My topic will focus on some the recent learnings from an Industrial IoT project.  I will talk about tag data ingestion, complex event processing (calculations, reference data, out of bounds, absence of event) and visualization.  I will also throw in a little BizTalk and Logic apps for good measure.

This will be my third time speaking in London at a BizTalk360 event.  I am once again looking forward to the experience as BizTalk360 always puts on a good show and it is a great opportunity to network with the excellent European Integration community.

For more details, please check out the event page.  There are early bird specials so pay close attention to the dates.

See you in London!

http://www.biztalk360.com/integrate-2016/

Advertisements