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

Question

Question

wait condition sticky note

asked on March 21, 2017

I want to use an escalation in my business process to remind the user and supervisor if a document has not been worked in 3 weeks.  One way a document is worked is adding annotations (typically a sticky note).

Is there a wait condition for annotation changes?

Thanks!

0 0

Answer

SELECTED ANSWER
replied on March 21, 2017

Hello Erik,

 

Workflow does not have built-in tokens or activities to pull annotation text from a document. You can get the text through scripting, save the text in a token, and then set a wait condition to trigger when the "Document : Annotation Text does not equal %(AnnotationTextToken)".

 

Since annotation text is stored in the repository database, there is another option that should work but is much more complex and involves multiple database lookups. I would also recommend extra caution in any scenario you are dealing with databases. At a basic level, we need to look up the annotation text in the appropriate database, and then base the wait condition to trigger on the change of this. I've provided a bit more instruction on how you might accomplish this below:

 

- Pull the entry ID of the document in question;

- Assuming you are working in an SQL environment, pull the "page_id" related to your entry ID (stored as "tocid") from the "dbo.doc" table;

- Using the "page_id", pull the related "ann_text" value from the "dbo.ann" table;

- Use this value in your wait condition


Keep in mind that if you have multiple annotations on the same page, you may have to loop the lookup and append a multi-value token with all of the retrieved values; that way, if any values change the workflow will detect it and continue.

 

Good luck!

Adam

1 0

Replies

replied on March 21, 2017

Hello Erik,

 

You can set a wait condition based on Annotation Text as seen below. Using the configuration options should allow you to achieve the functionality you are looking for.

 

Best regards,

Adam

 

1 0
replied on March 21, 2017

Thanks Adam.  I looked at Annotation Text but I'm stuck finding how to detect a change in the text.  The closest I can come up with "is not empty" but that doesn't cover when a second or third sticky note is added.

0 0
SELECTED ANSWER
replied on March 21, 2017

Hello Erik,

 

Workflow does not have built-in tokens or activities to pull annotation text from a document. You can get the text through scripting, save the text in a token, and then set a wait condition to trigger when the "Document : Annotation Text does not equal %(AnnotationTextToken)".

 

Since annotation text is stored in the repository database, there is another option that should work but is much more complex and involves multiple database lookups. I would also recommend extra caution in any scenario you are dealing with databases. At a basic level, we need to look up the annotation text in the appropriate database, and then base the wait condition to trigger on the change of this. I've provided a bit more instruction on how you might accomplish this below:

 

- Pull the entry ID of the document in question;

- Assuming you are working in an SQL environment, pull the "page_id" related to your entry ID (stored as "tocid") from the "dbo.doc" table;

- Using the "page_id", pull the related "ann_text" value from the "dbo.ann" table;

- Use this value in your wait condition


Keep in mind that if you have multiple annotations on the same page, you may have to loop the lookup and append a multi-value token with all of the retrieved values; that way, if any values change the workflow will detect it and continue.

 

Good luck!

Adam

1 0
replied on March 21, 2017

That's a very detailed reply, I appreciate you outlining the sql tables involved so I can understand it.

1 0
replied on March 22, 2017

Not a problem, Erik!

0 0
replied on March 22, 2017

I'm using this query with a For Each Row loop to append into a multi-value token "Annotations."  The query appears to properly grab all annotation text for any given entryid.

SELECT ann_text
  FROM [LF_Repository].[dbo].[ann]
  where page_id in (SELECT page_id
  FROM [LF_Repository].[dbo].[doc]
  where tocid=@entryid)

The wait condition correctly detects changes if there is one and only one annotation in the document.  However if there are no annotations or more than one the wait condition "Document : Annotation Text does not equal %(Annotation)" immediately passes through.

How does "Document: Annotation Text" represent the text of annotations?

0 0
replied on March 23, 2017 Show version history

I was able to work around the problem.

At the start of my loop I check the annotation text using the SQL lookup above.  Since I cannot prevent the escalation from occurring, I check the annotation text AGAIN at the start of the escalation.  Then I use a conditional decision to compare the annotations. 

If the annotations have changed then I loop back to the start of my escalation timer without sending any notifications.

It would have been nice if the Wait activity had more robust comparison tools.

0 0
replied on March 23, 2017

Thanks for the updates, Erik. I sent a message to one of our developers about your issue and will update you once I hear back. Glad you were able to find a workaround.

 

- Adam

0 0
replied on March 23, 2017

Hello again Erik,

 

After speaking to one of our developers, he confirmed that there aren't any other pre-configured options that would accomplish what is required in your use case.

 

That being said, we take feedback received from users into serious consideration for future product updates. We've passed this along to the team at Laserfiche responsible for Workflow.

 

Best regards,

Adam 

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

Sign in to reply to this post.