SET SERVEROUTPUT ON;
SET ECHO ON;

prompt ========================================
prompt Tracking WORKFLOW_MANAGER Package Version After Rollback
prompt MARS-1011: Record rollback to version 1.7.0
prompt ========================================

BEGIN
   DBMS_OUTPUT.PUT_LINE('Tracking WORKFLOW_MANAGER rollback version...');
   
   -- Track the rolled-back version (1.7.0)
   CT_MRDS.ENV_MANAGER.TRACK_PACKAGE_VERSION(
      pPackageOwner => 'CT_MRDS',
      pPackageName => 'WORKFLOW_MANAGER',
      pPackageVersion => CT_MRDS.WORKFLOW_MANAGER.PACKAGE_VERSION,
      pPackageBuildDate => CT_MRDS.WORKFLOW_MANAGER.PACKAGE_BUILD_DATE,
      pPackageAuthor => CT_MRDS.WORKFLOW_MANAGER.PACKAGE_AUTHOR
   );
   DBMS_OUTPUT.PUT_LINE('WORKFLOW_MANAGER rollback version tracked successfully.');
   
   -- Display rollback version info
   DBMS_OUTPUT.PUT_LINE('Rollback Version: ' || CT_MRDS.WORKFLOW_MANAGER.GET_VERSION());
   DBMS_OUTPUT.PUT_LINE('Build Info: ' || CT_MRDS.WORKFLOW_MANAGER.GET_BUILD_INFO());
     
EXCEPTION
   WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE('ERROR tracking WORKFLOW_MANAGER rollback: ' || SQLERRM);
      RAISE;
END;
/

prompt ========================================
prompt WORKFLOW_MANAGER Package rollback version tracking completed
prompt Rolled back to version 1.7.0 (2025-10-31)
prompt ========================================