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

Question

Question

Basic Query in Workflow 9.1 erroring out

asked on February 17, 2014 Show version history

I have a query in a workflow, that looks up (from a SQL DB located on the LF Server) a Month's Name based on the months digit representation.  I.e 01 is January, 02 is February and so on.   If I test the query in the workflow designer it succeeds, but If I actually run the workflow, it errors out at the query activity with the error:   "Object Reference not set to an instance of an object"

 

Anyone have any ideas.  Its such a basic workflow, I am not sure what could be wrong

0 0

Answer

SELECTED ANSWER
replied on February 18, 2014

If it works with a admin account but not SYSTEM then most likely the default NT AUTHORITY\SYSTEM login doesn't have permissions on the SQL database it's querying. 

 

I'd at least take a look at that first.  

0 0

Replies

replied on February 17, 2014

Are you sure it's Workflow 9.1? We've had an similar issue in Workflow 8.3.1, but it's been hotfixed.

 

The error message by itself is not enough to troubleshoot. If you could post the stack trace from the activities log (in the Logs node in WF Admin Aconsole), we might be able to tell more.

0 0
replied on April 25, 2016

I came across this post when searching for a similar issue with a "insert data" action in workflow 8.3.1, can you specify which hotfix you're referring to?

0 0
replied on April 25, 2016

The latest WF 8.3.1 hotfix is here. It also includes the issue mentioned above which was covered by an older hotfix. Note that without seeing the entire error message I can't guarantee that you are running into the same problem.

1 0
replied on April 25, 2016

KB1012970 resolved my issue

0 0
replied on February 17, 2014

Yes.  Workflow 9.1 (this is how it is listed in services and under help-about in the designer)

 

I got around the error by setting the workflow services to run as the domain admin, but I am curious as to if that is necessary.  workflow/Sql/Lf server are all on the same server right now.  here is the stack trace:

Timestamp: 2014-02-17 20:19:08.433
Local Time: 2/17/2014 3:19:08 PM
Category: Activity
Machine: SHIPLEY-LF
Severity: Error
Application Domain: Laserfiche.Workflow.Service.exe
Process Id: 5032
Process Name: C:\Program Files (x86)\Laserfiche\Laserfiche Workflow 9\Laserfiche.Workflow.Service.exe
Win32 Thread Id: 4100 - 
Thread Name: 
Message: <Exception handlingInstanceId="73be7406-c9a5-4241-acf9-04031cd391c7">
  <Description>An exception of type 'System.NullReferenceException' occurred and was caught.</Description>
  <DateTime>2014-02-17 15:19:08Z</DateTime>
  <ExceptionType>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
  <Message>Object reference not set to an instance of an object.</Message>
  <Source>Laserfiche.Workflow.Activities.83.External</Source>
  <HelpLink />
  <Property name="ActivityName">FindMonthByName</Property>
  <Property name="ActivityType">Laserfiche.Workflow.Activities.Data.DataActivity</Property>
  <Property name="InstanceId">cdfb3617-4247-4892-93e0-2e6011cd4de7</Property>
  <Property name="TargetSite">Laserfiche.Project.Data.SourceInformation GetSourceInformation(System.Workflow.ComponentModel.ActivityExecutionContext)</Property>
  <Property name="HResult">-2147467261</Property>
  <StackTrace>   at Laserfiche.Workflow.Activities.Data.DataActivity.GetSourceInformation(ActivityExecutionContext executionContext)
   at Laserfiche.Workflow.Activities.Data.DataActivity.CreateTaskOptions(ActivityExecutionContext executionContext, ITokenService tokenService)
   at Laserfiche.Workflow.Activities.Data.DataActivity.ExecuteTask(ActivityExecutionContext executionContext)
   at Laserfiche.Workflow.Activities.TaskActivityBase.Execute(ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
   at System.Workflow.Runtime.Scheduler.Run()</StackTrace>
  <additionalInfo>
    <info name="MachineName" value="SHIPLEY-LF" />
    <info name="TimeStamp" value="2/17/2014 8:19:08 PM" />
    <info name="FullName" value="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <info name="AppDomainName" value="Laserfiche.Workflow.Service.exe" />
    <info name="ThreadIdentity" value="" />
    <info name="WindowsIdentity" value="NT AUTHORITY\SYSTEM" />
  </additionalInfo>
</Exception>
----------------------------------------

 

0 0
replied on February 18, 2014

Chris, I will take a look at that.  One thing that confuses me though, (in the WF designer) shouldn't the test query error out then?  Im curious as to why that succeeds but running the actual WF activity fails

0 0
replied on February 18, 2014

That's something that has caught me time and time again. cheeky

 

When you are in workflow designer and test something it uses your credentials. This is actually a good thing - otherwise you could potentially get into data you are not supposed to have access to using Workflow Designer as a "backdoor"! 

0 0
replied on February 18, 2014

Thanks for the info Chris.  I gave NT authority\system access to the database and it fixed the issue

0 0
replied on July 28, 2016

I verified that  NT authority\system has access to my database but I still get the error on query data actvity.  Using WF 9.2

0 0
replied on July 28, 2016

Resolved:  I changed the datasource authentication for Query Data activity to server authentication

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

Sign in to reply to this post.