Hi there,
I have a process that requires approval from 4 different departments. The approval takes place on 4 different InfoPath forms and sets the value of 4 different fields (created within InfoPath). I have 4 lines going into 1 data manipulation event with the following user defined code:
If SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields
("K2InfoPathSchema").Value,"my:myFields/my:TechnicalApproval") = "Approved" And _
SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields
("K2InfoPathSchema").Value,"my:myFields/my:RetailApproval") = "Approved" And _
SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields
("K2InfoPathSchema").Value,"my:myFields/my:CentralPlanningApproval") = "Approved" And _
SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields
("K2InfoPathSchema").Value,"my:myFields/my:SitePlanningApproval") = "Approved" Then
K2.ProcessInstance.XmlFields("K2InfoPathSchema").Value =
SourceCode.K2Utilities.XMLFieldMod.SetXMLValue(K2.ProcessInstance.XmlFields
("K2InfoPathSchema").Value, "my:myFields/my:ProductApproval", "Approved")
End If
The line event from this then checks the value of 'ProductApproval', but the workflow completes without completing this last step.
I suspect that once the first approval is fired, it gets to the data manipulation event and terminates at the first try.
What would be the best way to achieve the result I'm looking for?
Many thanks.