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

Question

Question

Query email address from database

asked on July 16, 2015

Hi,

In a workflow i am trying to query the mail address of a user from a database table based on a field from a document template. There are cases where the mail is sent and there are cases where the mail is not sent. 

Below is part of the workflow:

Below is the database table the mail addresses are ok

AP Officers Field is a dynamic field pulling data from name column from MT_Users Table 

Grateful if someone can help me analyse the issue further.

 

Regards

Sweety

0 0

Replies

replied on July 16, 2015 Show version history

Sweety,

Not a direct answer to your question but I would recommend putting a Conditional Decision activity in workflow with some error checking logic.  I would check to make sure that the Query Data activity returned a recordset instead of assuming that it always will.  If you do some error checking at least you can trap the instances where there is no email address returned and perhaps set some token values that will allow you to track down the problem.  Here is a snippet from your workflow with some error checking in place;

0 0
replied on July 21, 2015

Well, I do not think that above is the right option for me as I am taking the mail addresses of AP officers based on the AP Officer selected in a list.

Is there any other way I get the mail address of a user based on the name I select from list in Laserfiche? Note that I am using Laserfiche rio and the client has exchange 2010 as mail server coupled with active directory

 

Regards

Sweety

0 0
replied on July 21, 2015

If these are domain users, why not look them up in Active Directory through an Active Directory trustee provider?

0 0
replied on July 23, 2015 Show version history

For users that are defined in Active Directory I am using Active Directory trustee provider.

However there is a set of users who does not form part of the Active Directory, eg a supplier. I am using Query Data Activity to retrieve thier email address from a database based on the name of user selected in a list field.

Is there any best mean to get mail addresses of these type of users?

Regards

Sweety

0 0
replied on July 16, 2015

Are you getting any errors when the emails do not send? If there aren't any errors, then Cliff's suggestion to make sure that valid information is being grabbed by your Query activity.

0 0
replied on July 21, 2015

I receive blank as mail address. However, I can see that the field AP Officer is returened. 

 

I picked part of the workflow and created a new workflow to test same and the values are retured from the query with no issue.

Is there any way to add a breakpoint when we have long workflow in Laserfiche?

 

Regards

Sweety

0 0
replied on July 21, 2015 Show version history

Sweety - I don't know enough about 'how' the Laserfiche engineers coded the Query Activity to determine if they are doing adequate error handling when executing the actual queries but the fact that your SQL query returned a blank value with a supposedly good query string and that it happens inconsistently is problematic. 

Your fallback action might be to just trap the error (an empty email address returned) and try to address it as elegantly as possible.  Perhaps some type of loop for a small number of iterations to retry the query and then throwing an exception email to IT and terminating the workflow?  The other option might be to throw an error if you catch an empty email address and then set up a custom Task Error Handler in the Workflow Admin Console to filter for that error message and perhaps restart the workflow?

As for debugging;  I have found that using the Assign Token Values and Track Tokens activities during workflow debugging allows me to set and retrieve intermediate token values to get a better idea of what is happening in the workflow as it runs.  When the workflow has been thoroughly debugged I then remove or disable those activities for production deployments.

0 0
replied on July 16, 2015

If you can narrow the date and time of failures down you could also do a Workflow search for completed instances of your workflow.  You could then open the individual workflow search items and verify that the Email activity did execute.  If the Email activity is being fed good data from the Query activity and executed then perhaps the issue is in the email system not workflow?

 

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

Sign in to reply to this post.