Skip to Content
Mastering Azure Serverless Computing
book

Mastering Azure Serverless Computing

by Lorenzo Barbieri, Massimo Bonanni
November 2019
Intermediate to advanced
362 pages
7h 52m
English
Packt Publishing
Content preview from Mastering Azure Serverless Computing

Activity functions

The activity function is the unit work of a Durable Function. You can see an activity function as a standard Azure Function triggered by an orchestrator call.

An activity function is marked with the ActivityTrigger attribute:

[FunctionName(FunctionNames.AddOrderFunction)]public static async Task<bool> Run([ActivityTrigger] Order order,    [Table(SourceNames.OrdersTable, Connection = "StorageAccount")] CloudTable giftTable,    ILogger log){    // Function code}

The binding payload for the ActivityTrigger attribute is the entity that you use in the orchestrator function when you start it using CallActivityAsync or CallActivityWithRetryAsync.

If you want, you can use the DurablaActivityContext class as binding and retrieve the object ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Serverless Architectures with Microsoft Azure

Advanced Serverless Architectures with Microsoft Azure

Daniel Bass
Azure Serverless Computing Cookbook - Third Edition

Azure Serverless Computing Cookbook - Third Edition

Praveen Kumar Sreeram, Kasam Shaikh, Greg Leonardo

Publisher Resources

ISBN: 9781789951226Supplemental Content