Dynamic Workflow voting

I am using the following peice of code for dynamic voting of workflow : 


StringBuilder voteXml = new StringBuilder("");
voteXml.Append("<Item type=\"Activity\" action=\"EvaluateActivity\">");
voteXml.Append(" <Activity>{0}</Activity>");
voteXml.Append(" <ActivityAssignment>{1}</ActivityAssignment>");
voteXml.Append(" <Paths>");
voteXml.Append(" <Path id=\"{2}\">{3}</Path>");
voteXml.Append(" </Paths>");
voteXml.Append(" <DelegateTo>0</DelegateTo>");
voteXml.Append(" <Tasks />");
voteXml.Append(" <Variables />");
voteXml.Append(" <Authentication mode=\"\" />");
voteXml.Append(" <Comments>{4}</Comments>");
voteXml.Append(" <Complete>1</Complete>");
voteXml.Append("</Item>");

Item result = inno.newItem();
result.loadAML(String.Format(voteXml.ToString(), arrActivity[i], arrActivityAssignment[i], Path, Paths, "Done"));
result = result.apply();

However there are some validations on the pre transition method of an activity, as long as the validation passes the method runs fine. However in case of an error message , the respective workflow activity is getting closed (it is supposed to remain active).

Could someone please let me know why this is happening.

Thanks.

Parents
  • Hi

    Pre transition events are associated with life cycle of an item type and voting are associated with Workflow of an item type.

    1. Check whether the method is triggered before the workflow sign off activity.

    2. Check whether the life cycle transition is happening before sign off or after sign off.

    I suspect, there is a Promotion attached to an activity in workflow and the method is triggering during that promotion.

    Example: 

    Life Cycle : Start --> In Progress --> Closed

    Workflow : New --> In Review --> Closed

    Assume

    Added Pre Transition event in Start state in life cycle

    Added Promotion in In Review activity (Life cycle state change from Start --> In Progress)

    On Sign Off from New to In Review, 

    First sign off will happen, then on complete of this sign off activity, will trigger the life cycle promotion from Start to In Progress

    So, Pre Transition method is added on start of this promotion so it will throw error.

    Let me know if it helps.

    Thanks

    Gopikrishnan R

  • The dynamic workflow voting community has been functional for the depiction of the citizens. The element of the sign and custom law essay is ensured for the top of the terms for all humans. The workflow video and tip is argued for the mid of the plants for the team. The elevation is done for use of the offers for all arguments for the individuals.

Reply
  • The dynamic workflow voting community has been functional for the depiction of the citizens. The element of the sign and custom law essay is ensured for the top of the terms for all humans. The workflow video and tip is argued for the mid of the plants for the team. The elevation is done for use of the offers for all arguments for the individuals.

Children
No Data