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

Question

Question

How do I send an email to the person who initiated the Business Process when a document was changed

asked on April 13, 2016

My goal is to send a notification email to the person who started the workflow on a specific document when someone else has changed the document ("electronic file", mostly MS Word file). I tried 'Find User' and 'E-mail' tool as below and set up a Starting Rule. But it does not send email. What would be the correct way to implement this? When I "start Business process" on a test document, the workflow just starts and terminates right away. How do I make my workflow wait until the document is changed? LDAP Trustee Directory is setup correctly (at least I believe). Thanks,

 

0 0

Replies

replied on April 14, 2016

Hi Nam,

 

I'm assuming you have set the Find User to task to resolve the username using the %(initiator) token?

0 0
replied on April 14, 2016

I'm not sure what you're trying to do with "Start Business Process". This workflow would start on its own from the "entry change" starting rule you have. You should be modifying the document to trigger it.

0 0
replied on April 14, 2016

Chris: Yes. That's correct.

Miruna: That's exactly where I am confused. How do I "modify the document to trigger it"? Definitely I am not understanding fully the difference between "starting Business Process" with a document and making a certain workflow start by an event. I would very appreciate if you can clarify that. Thanks.

0 0
replied on April 14, 2016

Business processes apply to the case where you want a user to purposely start a specific workflow. In your case, you don't. You want the action of users to cause Workflow to notify somebody.

But that breaks down to 2 separate things to solve: knowing who to notify and knowing when to notify them. Basically, you want your users to say "I'm interested in this document" and later, when the document is modified, you want Workflow to go notify all users who are interested in that document.

So, let's worry about step 1. How do your users indicate their interest in the document? Do you expect them to add their name to a field on the document? Is the document already assigned to them in some way?

0 0
replied on April 14, 2016

That's extremely helpful tip, Miruna. Thank you very much. Now it is a little bit clearer to me.

For the first question, now I set up a tag called "Notify change to owner" and will check if this tag is set in the workflow. I will let you know the result.

But the error message in the workflow log seems to be similar as the one someone else mentioned in this forum before: when a user id returned from 'Find User' includes domain name and backslash, this is not recognized in the next step. But I will try further and will post the result.

0 0
replied on April 14, 2016

Oh, that makes it easier to know who to notify if you're using the document owner property. It means you don't have to do anything to record the names of the users interested in the document, we can just look it up when a change occurs.

Then we only have to deal with the notification. The starting rule for that should check if the document has that tag in addition to the Entry Changes condition.

I'm going to assume we're talking about the document owner property as Laserfiche supports it, but if you use a field to indicate the owner, the basic idea works the same way, it's just a matter of changing where you get the information.

So, when the workflow starts, we need to get the owner property. We can do that with Find Entry.

 

0 0
replied on April 14, 2016

I finally managed to make my workflow send automatic notification when a document is changed (Thanks Miruna!). 

Comment about the Workflow Designer: In 'Find User' tool, the options for AD attributes are somewhat limited. I used ID (userid, samaccountname?) and 'Display Name'. This means I have to force my users to enter owner name with only Active Directory User ID or Display Name. In many cases, they already entered owner field with just common names format like 'Firstname Lastname', while our AD's Display Name is in the format of 'Lastname, Firstname'. I wish there was one more option of "FirstName LastName" in workflow designer.

 

  

0 0
replied on April 14, 2016

Good point, I didn't think about the owner making modifications themselves. I'd still move the check for the tag in the starting rule to make it more efficient (since if the tag is not present, the Subscriber would discard the event directly rather than the current configuration where the Workflow starts, checks one condition and ends).

As far as the user properties you can search for in Active Directory, we only added the more common ones. You can define custom properties though and Workflow will pick them up. See the section on custom properties in this help page.

0 0
replied on April 14, 2016

Thank you for the suggestion, Miruna.

 

By the way, I realized that when 'Find User' failed to find one, it seems just to errors out and stop the whole workflow and does not move to the next step in spite that the next conditional decision does have an option of "Has Result". So, I am trying try-catch block now. Is this normal behaviour? If so, wouldn't it be better not to error out when there was no match? 

0 0
replied on April 15, 2016

This is the final working version for the record:

Using try-catch block every time 'Find User' activity is used is rather annoying. I wish this activity has an extra option such as "Ignore no find error" or something.  

I appreciate you guys' help.

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

Sign in to reply to this post.