Skip to content

Commit

Permalink
Merge pull request #91 from pfiadeiro/issue87-switchemailalerting
Browse files Browse the repository at this point in the history
Issue 87 - Switch Email Alerting Call to Use Utils Pipeline
  • Loading branch information
mrpaulandrew authored Nov 30, 2020
2 parents 454f647 + c79fefe commit e857694
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 20 deletions.
49 changes: 31 additions & 18 deletions DataFactory/pipeline/04-Infant.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@
},
{
"name": "Send Email",
"description": "Use an Azure Function to perform an SMTP client email send operation.",
"type": "AzureFunctionActivity",
"type": "ExecutePipeline",
"dependsOn": [
{
"activity": "Get Email Parts",
Expand All @@ -357,25 +356,39 @@
]
}
],
"policy": {
"timeout": "0.00:10:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": true
},
"userProperties": [],
"typeProperties": {
"functionName": "SendEmail",
"method": "POST",
"body": {
"value": "@activity('Get Email Parts').output.firstRow",
"type": "Expression"
"pipeline": {
"referenceName": "Email Sender",
"type": "PipelineReference"
},
"waitOnCompletion": true,
"parameters": {
"Recipients": {
"value": "@activity('Get Email Parts').output.firstRow.emailRecipients",
"type": "Expression"
},
"CcRecipients": {
"value": "@activity('Get Email Parts').output.firstRow.emailCcRecipients",
"type": "Expression"
},
"BccRecipients": {
"value": "@activity('Get Email Parts').output.firstRow.emailBccRecipients",
"type": "Expression"
},
"Subject": {
"value": "@activity('Get Email Parts').output.firstRow.emailSubject",
"type": "Expression"
},
"Body": {
"value": "@activity('Get Email Parts').output.firstRow.emailBody",
"type": "Expression"
},
"Importance": {
"value": "@activity('Get Email Parts').output.firstRow.emailImportance",
"type": "Expression"
}
}
},
"linkedServiceName": {
"referenceName": "FrameworkFunctions",
"type": "LinkedServiceReference"
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion DeploymentTools/DataFactory/ProcFwkComponents.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"/pipeline/02-Parent.json",
"/pipeline/01-Grandparent.json",
"/pipeline/Throw Exception.json",
"/pipeline/Check For Running Pipeline.json"
"/pipeline/Check For Running Pipeline.json",
"/pipeline/Email Sender.json"
],
"triggers": [
"/trigger/FunctionalTestingTrigger.json"
Expand Down
5 changes: 4 additions & 1 deletion MetadataDB/procfwk/Stored Procedures/CheckForEmailAlerts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ BEGIN
INNER JOIN procfwk.Recipients AS r
ON r.RecipientId = pal.RecipientId
WHERE ce.PipelineId = @PipelineId
AND ao.BitValue & pal.OutcomesBitValue > 0
AND (
ao.BitValue & pal.OutcomesBitValue <> 0
OR pal.OutcomesBitValue & 1 <> 0 --all
)
AND pal.[Enabled] = 1
AND r.[Enabled] = 1
)
Expand Down
9 changes: 9 additions & 0 deletions ProcessingFramework.sln
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FactoryTesting", "FactoryTe
EndProject
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "MetadataDBTests", "MetadataDBTests\MetadataDBTests.sqlproj", "{32D54B90-932D-44A3-911D-007C4B90BC55}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_ProcFwkUtils", "_ProcFwkUtils", "{6809EDBD-125D-440E-8486-9CFAB9BB5B7D}"
ProjectSection(SolutionItems) = preProject
DataFactory\pipeline\Check For Running Pipeline.json = DataFactory\pipeline\Check For Running Pipeline.json
DataFactory\pipeline\Email Sender.json = DataFactory\pipeline\Email Sender.json
DataFactory\pipeline\Intentional Error.json = DataFactory\pipeline\Intentional Error.json
DataFactory\pipeline\Throw Exception.json = DataFactory\pipeline\Throw Exception.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -165,6 +173,7 @@ Global
{EBC230DF-D45D-43E4-A74E-32ADA3DDAE7A} = {5A56A63A-351D-467D-A2DA-FDB3C9CBD252}
{20313ECA-118E-408D-BB42-8094A7A9CD20} = {CC7B607B-8C84-4E07-A6C8-326923752F92}
{463330CD-189F-42B4-984A-8D3C1385645B} = {CC7B607B-8C84-4E07-A6C8-326923752F92}
{6809EDBD-125D-440E-8486-9CFAB9BB5B7D} = {17586826-8BE9-4622-B12E-1683F2A20352}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {170F5302-BB9C-4569-8F43-D859C7678EF0}
Expand Down

0 comments on commit e857694

Please sign in to comment.