This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

EventHandler AfterCheckInChangesFinalize not seeing latest object after Auto Transition

Hope someone can enlighten me as to why this is happening.

Scenario:

Have a VAF app with MF EventHandlerAfterCheckInChangesFinalize configured based on Class.

Objects of Class move through WF to a State with an Auto State Transition of "fullfills specified criteria" (DaysTo > 0)

Transition is triggered and object moves to proper next State.

VAF MF EventHandlerAfterCheckInChangesFinalize fires upon object in new State.

But, env.ObjVerEx.State still shows previous (pre Transition ) State.

Object has proper new State when viewed in Client.

Making a change to any Object Property and [Save] causes EventHandlerAfterCheckInChangesFinalize to fire again and env.ObjVerEx.State now has proper (new) State.

Is there something with an Auto Transition and a subsequent AfterCheckInChangesFinalize that does not work ?

Is there a better EventHandler in this scenario ?t

Or ?

TIA

Parents
  • Found a solution:

    After AfterCheckInChangesFinalize Event Handler fires, added

    env.ObjVerEx.Refresh();

    prior to checking the WF State.

    The State property (env.ObjVerEx.State) now shows the proper current State.

    Still puzzled as to why the object triggering the Event Handler isn't the 'latest' as there are no subsequent Event Handler triggerings that would indicate another version has been created.

Reply
  • Found a solution:

    After AfterCheckInChangesFinalize Event Handler fires, added

    env.ObjVerEx.Refresh();

    prior to checking the WF State.

    The State property (env.ObjVerEx.State) now shows the proper current State.

    Still puzzled as to why the object triggering the Event Handler isn't the 'latest' as there are no subsequent Event Handler triggerings that would indicate another version has been created.

Children
No Data