You are viewing limited content. For full access, please sign in.

Question

Question

In workflow comment history, my content in the comment box appears twice

asked on June 6, 2016

Hi everyone,

I did a workflow so that when someone add a comment in a field it should appear in the comment history box as shown on the picture. But my comment is appearing twice. Can you please help.

I have a template where I am using those two fields. Comment and Comment History I have also added a condition to it.

 

Regards,

Ketsia

problem.png
prob2.png
prob3.png
prob4.png
issue.png
issue2.png
problem.png (14.89 KB)
prob2.png (73.03 KB)
prob3.png (73.74 KB)
prob4.png (72.51 KB)
issue.png (13.25 KB)
issue2.png (12.67 KB)
0 0

Answer

SELECTED ANSWER
replied on June 6, 2016

As Miruna says, being able to exclude workflow is best. 

If you can't do that, does it fix the issue if you reverse the order of the actions?  Retrieve Field Values, Clear Comment, then Assign Field Values.  That way the Comment field is cleared if the workflow gets started again before it adds the Comment to the Comment History.

 

0 0
replied on June 6, 2016

Hi Jennifer,

 

I tested it in reverse and now it works fine thanks

0 0
replied on June 7, 2016

Good to hear.

0 0

Replies

replied on June 6, 2016

Ketsia,

I wonder if your template field is setup to already have a date/time default in it.  The reason I say that is because the comment isn't duplicated, only the date/time reference, and I replicated this workflow exactly even down to the starting rules and it didn't do this when I ran it.  It only captured the comment history once, not twice.  You can check this in the Laserfiche Admin Console by going to Metadata Management, Fields, and then double clicking on the field you want (Comments History).  If there is anything at all in the default value field, this may be your problem.  If you don't have access to Laserfiche Admin, you could try changing your comments history field fill-in value in the "Assign Field Variables" activity to just %(RetrieveFieldValues_Comments), and see if that works.

0 0
replied on June 6, 2016

Did you look in the Subscriber Trace to see the events coming in and how they're evaluated?

Based on the rule, it looks like it works as designed. You set the comment, which generates an entry changed event. Workflow starts, reads the comment and modifies the document to set the Comment History field. This action generates the second Entry Change event. At this time, the comments field is not empty yet, because there's a decent chance Workflow reads the field values again before the Clear Fields activity runs.

You should change the connection profile in the workflow to something other than Admin and then exclude actions of that user in the starting rule. Having a dedicated user for Workflow would help troubleshooting situations like this by making it clear which are your actions and which ones come from Workflow.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.