WorkflowManagementServer

  • 26 August 2009
  • 6 replies
  • 2 views

Badge +2

I am not able to create connection to workflowmanagementserver. i get the error "the object reference not set to an instance of an object". but i am able to successfully connect to blackpearl and run my services if its an regular server connection. i checked all the connection strings and authentications not to mention that. But not this.

 

Any Insight into this matter will do.

 

Thanks 

 


6 replies

Badge +8
Can you post some sample code to verify?
Badge +2

Hi dc,


so heres the code.


private Connection blackperl()
        {
                Connection K2Con = new Connection();
                ConnectionSetup K2ConSetup = new ConnectionSetup();
                K2ConSetup.ConnectionParameters.Add(ConnectionSetup.ParamKeys.Host, ConfigurationManager.ConnectionStrings["K2Connection"].ConnectionString.ToString());
                K2Con.Open(K2ConSetup);
                return K2Con;
        }


 // with this above method i am able to connect to BP server and do my stuff


 private WorkflowManagementServer black()
        {
            WorkflowManagementServer server = new SourceCode.Workflow.Management.WorkflowManagementServer();
            ConnectionStringSettingsCollection connectConfig = ConfigurationManager.ConnectionStrings;
            server.Connection.Open(connectconfig["K2Connection"]);
            return server;
        }


// with this above method i get the error "object reference not set to an instance of an object"


 


and some more info


the "k2connect" there is the entry for connection string in the web.config 


 

Badge +11
Can you show us your K2Connection connection string?  You can X out any sensitive data.  (Host=XXXX...)
Badge +2
Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=xxxx;Port=5555;UserID=xxx;SecurityLabelName=K2;Password=xxx;WindowsDomain=xx
Badge +11

Insert the following line of code right before open the connection:


server.CreateConnection();

Badge +2

It worked with the complete connection string. earlier i had a connection string which only has a host key. now that i added the some more keys to that and the piece of code it worked.


Thank you David


 


 

Reply