Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Accessing State Conductor Context in Data hub framework

Anthony Clavio edited this page Nov 24, 2020 · 18 revisions

The Data Hub Frameworks Tasks send with the State Conductor allow you to access the State Conductor Context. There is a property in the the Data hub framework Options object called stateConductorContext. Changes made to the stateConductorContext in the datahub framework will effect the State Conductor context and be written back to the execution document.

The State conductor has two tasks for the Data hub framework that include the State Conductor Context.

  • /state-conductor/actions/common/dhf/dhf5RunFlowStepAction.sjs
  • /state-conductor/actions/common/dhf/dhf5RunFlowAction.sjs

here is an example of changing the stateConductorContext in a Data hub framework custom Step

function main(content, options) {

   //changes the stateConductorContext
   options.stateConductorContext.hasChanged = true;

   return content
}