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

Not working "Trigger the state transition once all separate assignments..."

Former Member
Former Member
Hi All,

Anyone knows why my workflow does not change to next state even though all assignments have been approved.



This stayed at "Awaiting for Approval" even though all assignments have been approved. It was working a couple of times. Is it any interval for the transmitting?

Thanks
Bin
Parents
  • Former Member
    Former Member
    Figured out my code below had a wrong sequence, once swap it and the automatic transmission works.


    // Relate it to the original object via the "workflow assignment" property.
    env.ObjVerEx.AddLookup((int) MFBuiltInPropertyDef.MFBuiltInPropertyDefWorkflowAssignment, // = 79
    new ObjVer()
    {
    Type = (int) MFBuiltInObjectType.MFBuiltInObjectTypeAssignment, // = 10
    ID = assignmentId
    });

    // Ensure that the audit is correct.
    env.ObjVerEx.SetModifiedBy(env.CurrentUserID);
    env.ObjVerEx.SaveProperties();


    Should swap the last two lines sequence as below

    env.ObjVerEx.SaveProperties();
    // Ensure that the audit is correct.
    env.ObjVerEx.SetModifiedBy(env.CurrentUserID);


Reply
  • Former Member
    Former Member
    Figured out my code below had a wrong sequence, once swap it and the automatic transmission works.


    // Relate it to the original object via the "workflow assignment" property.
    env.ObjVerEx.AddLookup((int) MFBuiltInPropertyDef.MFBuiltInPropertyDefWorkflowAssignment, // = 79
    new ObjVer()
    {
    Type = (int) MFBuiltInObjectType.MFBuiltInObjectTypeAssignment, // = 10
    ID = assignmentId
    });

    // Ensure that the audit is correct.
    env.ObjVerEx.SetModifiedBy(env.CurrentUserID);
    env.ObjVerEx.SaveProperties();


    Should swap the last two lines sequence as below

    env.ObjVerEx.SaveProperties();
    // Ensure that the audit is correct.
    env.ObjVerEx.SetModifiedBy(env.CurrentUserID);


Children
No Data