Genpact Cora Knowledge Center

Support

Execute a Stored Procedure or Service from an Expression

Overview

Follow these steps to execute a stored procedure or a service from an expression.

Prerequisites

  • Create a WCF service that returns a list of objects. The service can be a stored procedure or any other service, but it must return lists of objects.
  • Define the WCF service as a query in a form's data model. The query parameters can be basic.

Procedure

  • Write an expression that executes a stored procedure or service. See below for examples.

Example Expressions that Execute a Stored Procedure or Service

General example:

{Form1}.Query("CheckCondition").First()["Result"]

Defined parameters example:

{Form}.Query("CheckCondition", new Object[] { act.ActivityInstanceId }).First()["Result"])

Inside of a condition example:

ToBoolean({Form}.Query("CheckCondition", new Object[] { act.ActivityInstanceId }).First()["Result"])