The Execute Data Object process flow is a generic way to execute a stored procedure through the business logic framework in services.  Rather than force users to create a process flow for every stored procedure they want to execute, we created a generic one that should meet the majority of needs.  It does require naming your input parameters according to our naming conventions.  But if you can do that, it should save you a chunk of work.

The process flow has the following input properties:

Input PropertyType

Description

DataObjectNamestringThe name of the database object to execute
RequestobjectA POCO representing the client input
AuthenticatedAttributesobjectThe current authenticated attributes object for the caller.

This process flow will look at the input parameters declared on the database object referenced by 'DataObjectName'.  If the parameter name is in the format @ObjectName_ParameterName the process component will assume 'objectName' is an object that exists in the input properties, and attempt to look up a value 'parameterName' on that object.  There are three types of objects the component understands for ObjectName:

Examples

Let's assume we have the following endpoint defined

{
  "endpoints": {
    "ExamplesGetSingleProduct": {
      "route": {
        "httpMethod": "GET",
        "segments": {
          "examples": {
            "isLiteral": true,
            "type": "string"
          },
          "products": {
            "isLiteral": true,
            "type": "string"
          },
          "productId": {
            "isLiteral": false,
            "type": "long"
          }
        }
      },
      "businessLogic": {
        "allProductsRetrieval": {
          "executionType": "processFlow",
          "processFlowProperties": {
            "processFlowName": "Execute Data Object",
            "processFlowParameters": {
              "DataObjectName": "spGeteBusiness6_0ProductCatalog",
              "authenticatedAttributes": "@AuthenticatedAttributes"
            }
          }
        }
      }
	  //remaining metadata omitted
    }
  }
}

We want spGeteBusiness6_0ProductCatalog to return product information for the requested product id and with pricing information appropriate for the current user.  If we define our database object like this:

CREATE PROCEDURE spGeteBusiness6_0ProductCatalog
(      
  @Request_ProductId INT,
  @AuthenticatedAttributes_AuthenticatedPrincipalRecordId INT
)
--stored procedure body ommitted 

The system will automatically map those parameters for you.  @Request_ProductId will have the product ID from the URL, and @ AuthenticatedAttributes_AuthenticatedPrincipalRecordId will be the logged in person ID, or the anonymous person if the user is not authenticated.