5

I want to implement LogicApp, to trigger build every time, when someone changes key-value pairs in App Configuration. In order to do this, I've created a Logic app to trigger, when resource event occurs:

enter image description here

But, when I change something in App Configuration or manually trying to run Logic App, it fires an error:

enter image description here

InvalidTemplate
The template language expression evaluation failed: 'The execution of template trigger 'When_a_resource_event_occurs' failed: the result of the evaluation of 'splitOn' expression '@triggerBody()' is of type 'Null'. The result must be a valid array.'.

Can anyone hint me, what is wrong in Logic App configuration?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Vasyl Stepulo
  • 1,493
  • 1
  • 23
  • 43

1 Answers1

4

I test in my site and it works well. As the When a resource event occurs triggered when an Azure Event Grid subscription fires an event, so you do not need set Split On.

enter image description here

The Logic App is same as you and here is the snapshot of result.

enter image description here

Joey Cai
  • 18,968
  • 1
  • 20
  • 30
  • Hi, @Joey Cai! When I disabled Split On - now I'm able to run trigger manually, and build in Azure DevOps is started. But, when I change the value in App Configuration - nothing happens. Can you give me a hint, what can be a problem? Can you show me, how you configure Event grid subscription? – Vasyl Stepulo Apr 08 '20 at 08:32
  • I assuming, that problem might be with writing into event subscription - http://prntscr.com/rv9d25 – Vasyl Stepulo Apr 08 '20 at 08:39
  • 1
    Two choices. 1. Go to `event` in `App Configuration` and click Logic App to create the trigger. 2. Go to logic app and click the droplist in event grid. https://i.stack.imgur.com/s2Rpn.png – Joey Cai Apr 08 '20 at 08:47
  • 1
    @VasiliyVegas, Please Go to Subscription --> Resource Providers --> Type 'EventGrid' in Filter by Name textbox there and cross-check whether the status of Microsoft.EventGrid is Registered.and i have also set concurrency set to On with 1 as degree of parallelism. Because, if your event grid is not registered globally on the subscription level, you wont receive any events. - the same error i faced and i fixed it correctly by using this one. – Arulmouzhi May 17 '20 at 14:23
  • @VasiliyVegas, the above mentioned split on to OFF makes my body in output resultset non-visible.because SplitOn should be set to "ON". if you set it to OFF then it means you want to process file changes in batches. In that case event grid will return list (array) with objects rather then singular object. In which case you will need to handle items with for-each loops. – Arulmouzhi May 17 '20 at 14:23