Update record and remote disposition
- Last UpdatedApr 08, 2026
- 2 minute read
This scenario guides you through the process of updating the record and remote disposition, which may be required in certain situations. The disposition is a flag that indicates to the RealTime database (RTDB) that an important change has occurred and that publishing should be triggered once Omnicomm unlocks the record. If the disposition is set when there is no need to modify the record, it will have an impact on system performance.
To identify the code associated with each instruction, see the code comments in the Example code section.
To update record and remote disposition
In this example, the system writes the updated code for the new record and remote disposition to the UpdateDispositionCustom.cs file.
- In the created project used to implement custom steps for the Krunch Pipeline, open or create the class file.
- Set the class to implement the IStep interface.
- Give the class the name of your step.
- Set the Name member to the name of the step in the RealTime_PipelineExtensions_KrunchDataStream.json file.
- Set the ExecutionRequired member of the IStep Interface (For more information, refer to "IStep Interface Members" in the Execution Pipeline Application Programming Interface [API] Reference documentation).
- Create the step method, with IStepContext and ICachedSettings as parameters, and returning an IStepContext.
- Initialize return parameters and local stepContext variables that access the AdditonalParameters.
- Conditionally update the record disposition on the step context.
- Conditionally update the remote disposition on the step context.
Example code
// In the created project used to implement custom steps for the Krunch Pipeline, open or create the class file.
using System;
using OASySDNA.RealTime.ExecutionPipelines.KrunchCommon.Context;
using OASySDNA.RealTime.ExecutionPipelines.KrunchDataStream.Context;
using OASySDNA.RealTime.HighPerformanceSetDB;
namespace OASySDNA.RealTime.ExecutionPipelines.KrunchDataStream.Steps.Analog
{
// Set the class to implement the IStep interface.
// Give the class the name of your step.
public sealed class UpdateDispositionCustom : IStep
{
// Set the Name member to the name of the step in the RealTime_PipelineExtensions_KrunchDataStream.json file.
public String Name { get; } = " UpdateDispositionCustom ";
// Set the ExecutionRequired member of the IStep Interface.
public Boolean ExecutionRequired { get; } = false;
// Create the step method, with IStepContext and ICachedSettings as parameters, and
// returning an IStepContext.
/// <param name="stepContext">Context for krunching that contains information passed between steps.</param>
/// <param name="cachedSettings">Cached configurations from RealTime JSON files.</param>
/// <returns>The stepContext that has been updated by the step.</returns>
public IStepContext Execute(IStepContext stepContext, ICachedSettings cachedSettings)
{
// Initialize return parameters and local stepContext variables that access the AdditionalParameters.
Exception resultException = null;
var resultState = true;
var context = stepContext as KrunchContext;
var commonParameters = context.CommonParameters as CommonKrunchDataStreamParameters;
var additionalParameters = context.AdditionalParameters;
var setRecord = context.CommonParameters.SetRecord;
try
{
// Conditionally update the record disposition on the step context.
if (CustomConditionsMet())
{
commonParameters.RecordDisposition |= Disposition.DISP_DATA_MOD;
}
// Conditionally update the remote disposition on the step context.
if (CustomRemoteConditionsMet())
{
commonParameters.RemoteDisposition |= Disposition.DISP_DATA_MOD;
}
}
catch (Exception exp)
{
resultException = exp;
resultState = false;
}
context.StepResults.Add(new StepResult(Name, resultState, resultException));
return context;
}
}
}