Question

Custom Windows Service Using WorkflowManagementServer

  • 25 November 2013
  • 3 replies
  • 24877 views

Hi


I have designed a Windows Form Application that Retried Process Items in error state and it works perfectly.


I am Creating a Custom Windows Service with the same Functionality but as soon as I try and use the Workflow Management dll in order to use the WorkflowManagementServer item it gives me an error


Error 2 The type or namespace name 'Management' does not exist in the namespace 'SourceCode.Workflow' (are you missing an assembly reference?)


The warning stated that I should change my Framework to a non Client Profile which I did.

This allows me to build the Solution.    

 

but after I install the Service it is running but nothing is happening. I have reviewed this and found that as soon as I add any Workflow.Management references the system does not execute the code.

 

Do you have any idea why this could prevent the application code from executing.

 


 


3 replies

Could be a bunch of different issues; I recommend checking your HostServer and Deploy logs for additional errors.  Verify that you have referenced the SourceCode dll, that you are using the correct one for your CPU architecture, and that the .NET assemblies are not missing upon deployment.

I would recommend custom services as web based than windows. You can very well consume management related dll inside your Winform application directly but developing as winservice is nightmare. You have no control over the response from K2 servers in a timely manner.

 

Develop a wrapper WCF around K2 management dll or you can use readily available K2 services. Following services are available as ASMX, WCF and rest which is wonderful resource I would suggest to consume inside your custom development.

 

Cheers

Nathan Pillai

London.

Hi Husher,

 

I have to agree with ssnathan_72yaho, a custom webservice would be an awesome way to expose this and  use it in a workflow.

 

Regardless, I'd suggest wrapping the calls you make in a try/catch block and dumping the exception to the console.  That may give you a better idea of what's actually causing the code to not execute.

Regards,


Mike

Reply