Deploying a Decision Model and Notation (DMN) project as an Azure Function is only half of the process. This article focuses on executing your DMN service, request formatting, and response handling.

When you deploy a DMN model as an Azure Function, you'll receive a unique execution URL that allows you to execute your DMN model as an Azure Function.

Preparing the Execution Request for Azure Function

Request Details

  • URL: Your unique Azure Function execution URL
Copy Execute URL FOR How To
  • Method: POST
  • Content-Type: application/json
  • Body: The original input should be re-formatted as below, surrounded by an input tag for the request body.
Input Data Structure

Response Structure from Azure Function

A successful DMN service execution returns a response as follows.

Executing Azure service

Response Key Components

  • isCanceled: Indicates execution status
  • notification: notification array if there is any notification defined in the model
  • invocationId: Unique identifier composed of:
    • RequestId: Azure platform generated
    • RunId: FlexRule engine execution identifier
  • elapsed: Execution time duration
  • runtimeVersion: FlexRule Runtime version
  • outputs: Decision results array

Summary to Execute the DMN Service as an Azure Function

Once you deploy your DMN model as an Azure Function, you will receive a unique execution URL that allows you to invoke the decision service as an Azure Function.