Error profile show invalid email address


Badge +12


 

Symptoms


The email address : [Domain][User], is invalid
 

Diagnoses


We have determined that the escalation rule causes this error. When we checked the rule, the To address supplied was from a data field. Upon checking the process instance data, the data field had a value of "[domain][user]" which is a format of an invalid email address.

 

Resolution

In order to remove these instances in error state, you may update the data field via K2 API to update the value to an email address. After which perform a GoToActivity to expire the current one. When the activity escalates, the email will now be sent to the email address associated to the user. Here are some references:
1. Set data fields: https://www.k2.com/onlinehelp/k2blackpearl/devref/4.6.9/default.htm_Start_Instance_and_Get_Data_Fields.html?TocPath=Runtime%20APIs%20and%20Services|Workflow|Workflow%20Client%20API|Workflow%20Client%20API%20Samples|_____3
2. Retrieve data fields: https://www.k2.com/onlinehelp/k2blackpearl/devref/4.6.9/default.htm_Get_Data_Fields.html?TocPath=Runtime%20APIs%20and%20Services|Workflow|Workflow%20Client%20API|Workflow%20Client%20API%20Samples|_____5
3. Update method: https://www.k2.com/onlinehelp/k2blackpearl/devref/4.6.9/default.htm_../Subsystems/Default/Content/topic18290.html?TocPath=Reference%20Information|Class%20Library%20Reference|SourceCode.Workflow.Client%20Assembly|Namespaces|SourceCode.Workflow.Client%20Namespace|Classes|ProcessInstance|Methods|_____3

Here's a sample snippet:
SourceCode.Workflow.Client.Connection conn = new SourceCode.Workflow.Client.Connection()
conn.Open("localhost")
int procInstID = 6
SourceCode.Workflow.Client.ProcessInstance ProcInst = conn.OpenProcessInstance(procInstID)
ProcInst.DataFields["MyDataField"].Value = "New Value"
ProcInst.Update()


To prevent this from happening to new instances, you would need to redesign your process. You may consider using the following smartobjects to return the email associated with the value of the "AGM" data field:
UMUser: "Get User Details" needs the FQN as input - [security label]:[domain][user] (eg. K2:DENALLIXAdministrator)
ADUser: "GetUserDetails" needs the username as input - [domain][user] (eg. DENALLIXAdministrator)




 

0 replies

Be the first to reply!

Reply