Skip to main content

afterSuccessfulStep

Short summary

Sets the stop request behavior to execute after successful step completion.

Purpose and usage

This method configures the cycle manager to process stop requests only after a step has completed successfully. When this mode is active, stop requests received during step execution will be deferred until the current step completes with success.

This ensures that critical operations can complete successfully before the cycle is stopped, maintaining data integrity and process consistency.

typical usage patterns

  1. Safe stopping: Ensure processes complete before stopping
  2. Data consistency: Finish transactions before stopping
  3. Clean shutdown: Complete current operation cleanly
  4. Production safety: Avoid partial operations

When to use

  • When steps must complete successfully before stopping
  • For operations that should not be interrupted mid-execution
  • When data consistency requires complete transactions
  • In production environments requiring clean shutdowns

Example

// Configure safe stopping after success
cycleManager.configuration.configuration.sequence
.stopRequest
.afterSuccess();

// Usage in step implementation
CASE cycleManager.steps.current OF
MySteps.CRITICAL_OPERATION:
// This operation will complete before stop is processed
IF performCriticalOperation() THEN
cycleManager.steps.next := MySteps.NEXT_STEP;
END_IF;
// Stop request will be processed after this step succeeds
END_CASE

Parameters

none

Code

Declaration

METHOD afterSuccessfulStep

Implementation

THIS^.cycleManager.defaultStopRequestMode := CNM_CycleManagerInterfaces.StepStopRequestMode.AFTER_SUCCESSFUL_STEP;