question

RaviShukla-3199 avatar image
0 Votes"
RaviShukla-3199 asked ShaikMaheer-MSFT commented

Runbook got failed but data factory webhook activity kept running or completed without any error

Hello Team ,

We have create runbook which process the azure analysis services .and we using data factory webhook activity to trigger the runbook .

For success scenario :- once runbook completed without error webhook completed .
For failure scenario:- once runbook completed and we have error on error tab but webhook still getting completed ,Please find the screen shot below :-
Runbook error:-128870-image.png
ADF wehbook:-128943-image.png
Runbook
128905-image.png

We need if Runbbok have error then webhook should failed on adf .

azure-data-factorywindows-server-powershellazure-automationazure-analysis-services
image.png (32.7 KiB)
image.png (95.5 KiB)
image.png (66.3 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @RaviShukla-3199 ,

Thank you for posting query on Microsoft Q&A Platform.

Could you please see what output json of webhook activity giving in case of failure scenario?

You can check the status returned to webhook activity in the output json and then using if activity validate the status and control pipeline in desired fashion.

Also, WebHook activity now allows you to surface error status and custom messages back to activity and pipeline. Set reportStatusOnCallBack to true, and include StatusCode and Error in callback payload. For more information, Click here.

Please note, The webhook activity fails when the call to the custom endpoint fails. Any error message can be added to the callback body and used in a later activity.

Please let us know updates so that we can check further. Thank you.

0 Votes 0 ·

Hi @RaviShukla-3199 ,

Following up to see if below answer helps you? If yes, Please consider to click on Accept Answer. Accepted answers helps community as well. Please let us know if any further queries. Thank you.

0 Votes 0 ·

1 Answer

stan avatar image
0 Votes"
stan answered stan commented

Hi,
The answer to this issue is available here. If a cmdlet gives error and you want the runbook to fail instead of continuing to the next cmdlet you need to $errorActionPreference = "Stop" by default that value is Continue.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Stan,

I had tried the answer given by you .

post applied try and catch statement on automation script my runbook is getting failed but still my ADF pipeline still running .please find the screenshot below :-

Runbook:-129091-image.png
ADF pipeline still running:-129048-image.png

while applying try and catch statement my runbook got failed but why my ADF pipeline still running .

Please let me know if you need any information.


0 Votes 0 ·
image.png (71.7 KiB)
image.png (67.5 KiB)
stan avatar image stan RaviShukla-3199 ·

Hi,
From this point on is is about building your runbook (code) logic as you desire. When a webhook for a runbook is called it just triggers the runbook but does not wait for end result. That is just general behavior of any service that has webhook. If you want to achieve something else and the behavior is not the one you are seeking you will probably have to go on another path. You should accept the answer given and may be post another question specific for ADF on what you are trying to achieve.

0 Votes 0 ·

Hi Stan ,

I am able to get the failure on runbook now ,but still my ADF pipeline is kept running .Please suggest

I am using webhook activity to trigger the runbook .

Please let me know if you need any other details .

0 Votes 0 ·
stan avatar image stan RaviShukla-3199 ·

See my previous comment.
129805-image.png


0 Votes 0 ·
image.png (21.0 KiB)