Last active
April 18, 2021 01:25
-
-
Save ricardolsmendes/465c719ab1381b71e9f0e0cb5ce9e2ee to your computer and use it in GitHub Desktop.
Chaining Azure Functions with Durable Functions in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def orchestrator_function(context: df.DurableOrchestrationContext): | |
output = [] | |
request_body = context.get_input() | |
data = yield context.call_activity('get-funds-transfer-data', request_body) | |
output.append('Get funds transfer data: DONE') | |
yield context.call_activity('validate-input', data) | |
output.append('Validate input: DONE') | |
if data['sourceAccount']['bankId'] == data['targetAccount']['bankId']: | |
yield context.call_activity('validate-internal-account', data) | |
output.append('Validate internal account: DONE') | |
yield context.call_activity('handle-funds-transfer', data) | |
output.append('Handle funds transfer: DONE') | |
return output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment