Submitted Expenses are not shown

Feb 12, 2009 at 3:22 PM
Hi,

I am a beginner and apologize for the stupid question.

*) I have followed the instructions written in the readme.txt, by creating WorkflowStore database and ExpenseSample database.
*) I have configured the connection strings properly in all the 3 hosts (console, windows service and web)
*) The compilation is working properly without any error occured
*) I started the console host first and these messages are displayed

Starting Expense Host ...
Loading Expense Service ... Done!
Loading Expense Workflow Service ... Done!
Workflow Type : Sequential

Expense ConsoleHost started. Press any key to exit

*) I just left the console host on for this time
*) I run the winform for Expense Submission and Expense Approval
*) I have tried to submit an expense with the proper numeric value
*) The issue now is the submitted expenses are never shown in the grid, as well as in the Expense Approval grid
*) When i see the console, i saw the Submitting .... , Escalating ... , Expiring .... and evel WorkflowInstance completed with all the log details
*) But the weird thing that i have encountered that the ExpenseID is always zero
*) When i debugged the program, i didn't encounter any exception , so it is ruling out the problem with the connection string
*) When i checked at the SQL Server, there is not any single data in all tables in WorkflowStore and ExpenseSample databases

If someone can enlightened me in how to troubleshooting this issue, i am appreciating your help.

Thanks,

hadi teo









Coordinator
Feb 22, 2009 at 2:10 PM
Hi Hadi,

Please ensure that the "Distributed Transaction Coordinator" service is running on your machine.

Hope it helps.

Serena
Feb 23, 2009 at 1:27 AM
Hi Serena,

I have checked that the "Distributed Transaction Coordinator" service is running in the machine. Is there anything else that i should checked ?

Thanks,

hadi teo
Coordinator
Feb 24, 2009 at 1:34 PM
Hi Hadi,

Just to double-check, is the status of the "Distributed Transaction Coordinator" service "Started" ?

Next, is the "KtmRm for Distributed Transaction Coordinator" service "Started"?

What happens if you click the Refresh button on the Expense forms? Any errors?

Can you run the application in debug mode in Visual Studio and trace through the code? Take note that WCF expires the call in 1 minutes when you are tracing the code.

Thanks,
Serena
Feb 24, 2009 at 3:43 PM
Hi Serena,

Here i am attaching the message that is displayed in the MS-DOS console :

====================================================
Starting Expense Host ...
Loading Expense Service ... Done!
Loading Expense Workflow Service ... Done!
Workflow Type: Sequential

Expense ConsoleHost started. Press any key to exit.


Submitting...
Expense:
        WorkflowID=3e988019-b35e-4378-9765-d34ca6bb4059
        ExpenseID=0
        Employee=administrator
        Description=Local Travel Expenses
        Amount=25000
        Category=LocalTravel
        ExpenseDate=24/02/2009 00:00:00
        DateSubmitted=24/02/2009 15:07:45
        Status=Pending
        AssignedTo=Manager
        IsCompleted=False
        DateModified=24/02/2009 15:07:45

New ExpenseID = 0
Submitting...
Expense:
        WorkflowID=e7a02ee3-d2f9-4e68-97a1-2d2613d67f30
        ExpenseID=0
        Employee=administrator
        Description=
        Amount=399999
        Category=LocalTravel
        ExpenseDate=24/02/2009 00:00:00
        DateSubmitted=24/02/2009 15:08:24
        Status=Pending
        AssignedTo=Manager
        IsCompleted=False
        DateModified=24/02/2009 15:08:24

New ExpenseID = 0
Escalating...
Expense:
        WorkflowID=3e988019-b35e-4378-9765-d34ca6bb4059
        ExpenseID=0
        Employee=administrator
        Description=Local Travel Expenses
        Amount=25000
        Category=LocalTravel
        ExpenseDate=24/02/2009 00:00:00
        DateSubmitted=24/02/2009 15:07:45
        Status=Escalated
        AssignedTo=Head of Department
        IsCompleted=False
        DateModified=24/02/2009 15:08:26

Escalating...
Expense:
        WorkflowID=e7a02ee3-d2f9-4e68-97a1-2d2613d67f30
        ExpenseID=0
        Employee=administrator
        Description=
        Amount=399999
        Category=LocalTravel
        ExpenseDate=24/02/2009 00:00:00
        DateSubmitted=24/02/2009 15:08:24
        Status=Escalated
        AssignedTo=Head of Department
        IsCompleted=False
        DateModified=24/02/2009 15:09:16

Expiring...
Expense:
        WorkflowID=3e988019-b35e-4378-9765-d34ca6bb4059
        ExpenseID=0
        Employee=administrator
        Description=Local Travel Expenses
        Amount=25000
        Category=LocalTravel
        ExpenseDate=24/02/2009 00:00:00
        DateSubmitted=24/02/2009 15:07:45
        Status=Expired
        AssignedTo=
        IsCompleted=True
        DateModified=24/02/2009 15:09:16

WorkflowInstance : 3e988019-b35e-4378-9765-d34ca6bb4059 Completed!
Expiring...
Expense:
        WorkflowID=e7a02ee3-d2f9-4e68-97a1-2d2613d67f30
        ExpenseID=0
        Employee=administrator
        Description=
        Amount=399999
        Category=LocalTravel
        ExpenseDate=24/02/2009 00:00:00
        DateSubmitted=24/02/2009 15:08:24
        Status=Expired
        AssignedTo=
        IsCompleted=True
        DateModified=24/02/2009 15:10:06

WorkflowInstance : e7a02ee3-d2f9-4e68-97a1-2d2613d67f30 Completed!

=====================================================


*) I have submitted two (2) expenses application, the first amount is 25000 and the second amount is 399999
*) But both the ExpenseID are zero
*) I have checked the ExpenseLogs, ExpenseReviews and Expenses tables and there is no data at all at those 3 tables. I have checked the CompletedScope and InstanceState tables and both are empty as well

Regards,

hadi teo

Feb 24, 2009 at 3:53 PM
Hi Serena,

Please refer to my inline answers

>>>Just to double-check, is the status of the "Distributed Transaction Coordinator" service "Started" ?

Yes. It's started.

>>>Next, is the "KtmRm for Distributed Transaction Coordinator" service "Started"?

Apologize for not giving you the information of the base OS. Currently i'm running the Expense Sample application inside a VPC
that is running Windows 2003 Server Enterprise Edition SP2.

After i google around regarding KtmRm, i have found out that KtmRm service is only available when the base OS is Vista SP1. Is there
any equivalent service for Win 2003 Server ? Because i cannot find KtmRm service inside the services list

>>>What happens if you click the Refresh button on the Expense forms? Any errors?

There is no error message at all. It's just blank.

>>>Can you run the application in debug mode in Visual Studio and trace through the code? Take note that WCF expires the call in 1 minutes when you are tracing the code.

*) I run the ExpenseSample ConsoleHost first and wait until all services are Up
*)  i have made the WinForm project as the startup project
*) I pressed F5 and try to debug line by line at SubmissionForm.cs
*) I debugged inside at the SubmitterUserProcess.cs and i cannot debug further at proxy.SubmitExpense(expense).
*) sorry, but i haven't figured out how to debug the workflow. I will google around to check out the procedures in how to debug the WCF application

Thanks for your help.

Regards,

hadi teo

Feb 24, 2009 at 6:10 PM

Hi Hadi,

I got same issues and I located the problem.

Please check the app.config file in ExpenseSample.Business.Entities project, there is also a DB connection string pointed to your database.

Regards,

Calvin

 

Feb 25, 2009 at 1:43 AM
Hi Calvin,

Thanks very much for your help. Yes. I also didn't notice that there is app.config file in ExpenseSample.Business.Entities project

Unfortunately it's still not working. These are the steps that i have performed

*) Rebuild all the projects
*) Change from using SQL Authentication to use Windows authentication (Integrated Security=SSPI)

These are the results that i get

*) The ExpenseId is still 0
*) Not a single record is created in ExpenseLogs, ExpenseReviews and Expenses tables as well as CompletedScope and InstanceState

Thanks all for your kind help.

Regards,

hadi teo
Feb 26, 2009 at 8:17 PM
Edited Feb 26, 2009 at 8:22 PM
If you're using SQL Server 2005, open ExpenseModel.edmx in a text editor then change ProviderManifestToken's value from "2008" to "2005".  Rebuild the solution.  That should do it.

Feb 27, 2009 at 1:34 PM
Hi CodeSharp,

Thank you very much for your help. Your solution is perfectly working. I forgot to let you all know that i am using SQL Server 2005 not SQL Server 2008.

Thanks to Calvin and Serena for the help.

Regards,

Hadi Teo