Understanding Stateful CI

For any PeopleTools release before PeopleTools 8.55, the Component interfaces could be defined as local variables. When you initialized the local variable it required to load the legacy component every time.  For which you faced delays and the system performance suffered because when the component interface with large and complex legacy component was called from multiple events, the local variable was initialized multiple times in each event.

If you wanted to change the data in the legacy component, then you had to call the Save method of the component interface each time.

Considering the complexity involved in accessing the component interface object from multiple events, it is feasible to load the component interface one time. For which, you should declare the component interface as a Stateful CI which means declare the component interface as a component or global variable. Benefits of using a Stateful CI are:

  • Easy to reuse in different events.

  • One- time loading of the legacy component.

  • Data changes saved across different events and different server trips.

The performance of the component interface improves because:

  • There is no need to instantiate the component interface instance in every local scope.

  • There is no need to load data for legacy component used in the CI.

  • There is no need to run PreBuild and PostBuild events number of times.

  • There is no need to call Save method in every local scope to keep the data changes.