Question

Fields repeat in emails

  • 14 May 2020
  • 2 replies
  • 132 views

We commonly observe repeating fields in emails. We originally thought it happened when we use a reference to start a loop in the workflow, and the documentation supports this. However I came across one today that is not in a loop.

 

An example might look like this. The field provides the value "None":

 

Management Engagment Required: NoneNoneNoneNoneNone

 

The workflow is fairly simple, but muliple paths call the same subworkflow, and those paths are all from a shared split step. The split step splits into multiple paths and those paths all call the identical subworkflow, but with different input parameters. I'm not sure if that matters to the issue. The fields with the issue are all from a reference. We're seeing this now that we have multiple users on the system at the same time. It appears as if K2 has a concurrency bug with references.

 

I'd like some insight into fixing this. I removed the references and now I make a SMO call and use regular workflow variables. This is a scary one for us becuase we use references all over the place and we've only started concurrent user testing right now.


2 replies

Is this in K2 5 workflow designer or the older K2 Studio or Visual Studio?

 

In K2 Studio/Visual Studio running on K2 4.7 and K2 5 I would occasionally run into this.

 

My fix was to:  Delete the Subject and the Body in the client event wizard.  Save.  Add the message back in.   Deploy the workflow.  Test.  This wasn't as onerous as it sounds since we externalize the email content.  

 

However, doing a search I came across this article which seems K2 may have resolved the issue.

https://help.k2.com/kb003494

Userlevel 3
Badge +10

Hi,

I have been able to repro this locally on K2 Studio using the steps below:

1. Open any deployed process on K2 Studio which has an Email Event/Client Event with notifications enabled.
2. Click on "Next" until you reach the end of the wizard.
3. Do not click on "Finish" but instead click on "Cancel"
4. When a Warning pops up to cancel the wizard, select "Yes"
5. Save and re-deploy the workflow.

I have seen others adding a white space into the body and redeploying the workflow to fix this. On my end, finishing the wizard and not clicking on Cancel fixes this without making any changes to the body or the subject of the email.

Hope this helps!

Reply