DummyOrchestrationContext class
An orchestration context with dummy default values to facilitate mocking/stubbing the Durable Functions API.
- Extends
Constructors
Dummy |
Creates a new instance of a dummy orchestration context. All parameters are optional but are exposed to enable flexibility in the testing process. |
Properties
df | Object containing all DF orchestration APIs and properties |
Inherited Properties
extra |
An object used to get secondary inputs |
extra |
An object used to set secondary outputs |
function |
The name of the function that is being invoked |
invocation |
A unique guid specific to this invocation |
options | The options used when registering the function NOTE: This value may differ slightly from the original because it has been validated and defaults may have been explicitly added |
retry |
The retry context of the current function execution if the retry policy is defined |
trace |
TraceContext information to enable distributed tracing scenarios |
trigger |
Metadata about the trigger or undefined if the metadata is already represented elsewhere For example, this will be undefined for http and timer triggers because you can find that information on the request & timer object instead |
Inherited Methods
debug(any[]) | The recommended way to log debug data (level 1) during invocation.
Similar to Node.js's |
error(any[]) | The recommended way to log error data (level 4) during invocation.
Similar to Node.js's |
info(any[]) | The recommended way to log information data (level 2) during invocation.
Similar to Node.js's |
log(any[]) | The recommended way to log data during invocation.
Similar to Node.js's |
trace(any[]) | The recommended way to log trace data (level 0) during invocation.
Similar to Node.js's |
warn(any[]) | The recommended way to log warning data (level 3) during invocation.
Similar to Node.js's |
Constructor Details
DummyOrchestrationContext(string, string, LogHandler)
Creates a new instance of a dummy orchestration context. All parameters are optional but are exposed to enable flexibility in the testing process.
new DummyOrchestrationContext(functionName?: string, invocationId?: string, logHandler?: LogHandler)
Parameters
- functionName
-
string
The name of the orchestration function
- invocationId
-
string
The ID of this particular invocation of the orchestration
- logHandler
- LogHandler
A handler to emit logs coming from the orchestration function
Property Details
df
Object containing all DF orchestration APIs and properties
df: DurableOrchestrationContext
Property Value
Inherited Property Details
extraInputs
An object used to get secondary inputs
extraInputs: InvocationContextExtraInputs
Property Value
Inherited From InvocationContext.extraInputs
extraOutputs
An object used to set secondary outputs
extraOutputs: InvocationContextExtraOutputs
Property Value
Inherited From InvocationContext.extraOutputs
functionName
The name of the function that is being invoked
functionName: string
Property Value
string
Inherited From InvocationContext.functionName
invocationId
A unique guid specific to this invocation
invocationId: string
Property Value
string
Inherited From InvocationContext.invocationId
options
The options used when registering the function NOTE: This value may differ slightly from the original because it has been validated and defaults may have been explicitly added
options: EffectiveFunctionOptions
Property Value
Inherited From InvocationContext.options
retryContext
The retry context of the current function execution if the retry policy is defined
retryContext?: RetryContext
Property Value
Inherited From InvocationContext.retryContext
traceContext
TraceContext information to enable distributed tracing scenarios
traceContext?: TraceContext
Property Value
Inherited From InvocationContext.traceContext
triggerMetadata
Metadata about the trigger or undefined if the metadata is already represented elsewhere For example, this will be undefined for http and timer triggers because you can find that information on the request & timer object instead
triggerMetadata?: TriggerMetadata
Property Value
Inherited From InvocationContext.triggerMetadata
Inherited Method Details
debug(any[])
The recommended way to log debug data (level 1) during invocation.
Similar to Node.js's console.debug
, but has integration with Azure features like application insights
function debug(args: any[])
Parameters
- args
-
any[]
Inherited From InvocationContext.debug
error(any[])
The recommended way to log error data (level 4) during invocation.
Similar to Node.js's console.error
, but has integration with Azure features like application insights
function error(args: any[])
Parameters
- args
-
any[]
Inherited From InvocationContext.error
info(any[])
The recommended way to log information data (level 2) during invocation.
Similar to Node.js's console.info
, but has integration with Azure features like application insights
function info(args: any[])
Parameters
- args
-
any[]
Inherited From InvocationContext.info
log(any[])
The recommended way to log data during invocation.
Similar to Node.js's console.log
, but has integration with Azure features like application insights
Uses the 'information' log level
function log(args: any[])
Parameters
- args
-
any[]
Inherited From InvocationContext.log
trace(any[])
The recommended way to log trace data (level 0) during invocation.
Similar to Node.js's console.trace
, but has integration with Azure features like application insights
function trace(args: any[])
Parameters
- args
-
any[]
Inherited From InvocationContext.trace
warn(any[])
The recommended way to log warning data (level 3) during invocation.
Similar to Node.js's console.warn
, but has integration with Azure features like application insights
function warn(args: any[])
Parameters
- args
-
any[]
Inherited From InvocationContext.warn