Author Topic: Need Help in Understanding the Unity Genesys exception information  (Read 5270 times)

Offline Vegeta

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
Hello Genesys Wizards,

Request your help and guidance to deal with the below exception while calling Genesys exe from C# cmd line, when I try it from local command prompt ( Just the  finalpath string in below code ) it works perfectly but if I do the same via code, I am receiving an exception [ Bottom of this post ]

I have googled the exception , but couldn't really make out what does it mean , could someone please help me understand what does this exception mean?

[code]private void LaunchWDE(string place,string csProxyUrl,string wdeAppName,int portNumber)
        {
            try
            {
   
          string    finalpath = @"C:\PATH\InteractionWorkspace.exe -url tcp://<HOST>:<PORT>/<APPLICATIONNAME> -u <USERNAME> -p <PASSWORD> -place <PLACE/LOGINID>";

                ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd", "/c " + finalpath);

                procStartInfo.RedirectStandardOutput = true;
                procStartInfo.UseShellExecute = false;
                procStartInfo.CreateNoWindow = true;
                System.Diagnostics.Process proc = new System.Diagnostics.Process();
                proc.StartInfo = procStartInfo;
           
                proc.Start();
                string result = proc.StandardOutput.ReadToEnd();
                this.Close();
            }
            catch(Exception ex)
            {
                MessageBox.Show("Error while launching WDE" + ex.Message + " " + ex.InnerException);
            } [/code]

Exception ::
Microsoft.Practices.Unity.ResolutionFailedException was unhandled
Message: An unhandled exception of type 'Microsoft.Practices.Unity.ResolutionFailedException' occurred in Microsoft.Practices.Unity.dll
Additional information: Resolution of the dependency failed, type = "Genesyslab.Desktop.Infrastructure.IBootstrapController", name = "". Exception message is: The current build operation (build key Build Key[Genesyslab.Desktop.Infrastructure.IBootstrapController, null]) failed: The current type, Genesyslab.Desktop.Infrastructure.IBootstrapController, is an interface and cannot be constructed. Are you missing a type mapping? (Strategy type BuildPlanStrategy, index 3)

Thanks

Offline Vegeta

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
Re: Need Help in Understanding the Unity Genesys exception information
« Reply #1 on: July 15, 2016, 07:23:48 AM »
@ All, after some googling efforts and a tip from Genesys Support.
I was able to finally launch the WDE instance from C# code... with arguments attached.

Tip from Genesys:
# Try to set the Directory path to the WDE installation ( I tried previously by passing whole path in string but that wasn't so useful).

If it might benefit others.. just pasting the working code for reference..

[code]
  string Path = "C:\Program Files\GCTI\Workspace Desktop Edition\InteractionWorkspace";

           
                Directory.SetCurrentDirectory(Path);
           
                ProcessStartInfo procStartInfo = new ProcessStartInfo();
                procStartInfo.FileName = "InteractionWorkspace.exe";
                procStartInfo.Arguments = @"-url tcp://<HOST>:<PORT>/<APPLICATIONNAME> -u <USERNAME> -p <PASSWORD> -place <PLACE/LOGINID>";
             
  // The following commands are needed to redirect the standard output.

                procStartInfo.RedirectStandardOutput = true;
                procStartInfo.UseShellExecute = false;
                procStartInfo.CreateNoWindow = true;

// Now we create a process, assign its ProcessStartInfo and start it

                System.Diagnostics.Process proc = new System.Diagnostics.Process();
                proc.StartInfo = procStartInfo;
           
                proc.Start();
[/code]

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Need Help in Understanding the Unity Genesys exception information
« Reply #2 on: July 15, 2016, 12:53:52 PM »
And...what is this for? What you did?

Enviado de meu E6633 usando Tapatalk


Offline Vegeta

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
Re: Need Help in Understanding the Unity Genesys exception information
« Reply #3 on: July 28, 2016, 08:35:09 AM »
[quote author=cavagnaro link=topic=9713.msg44065#msg44065 date=1468587232]
And...what is this for? What you did?

Enviado de meu E6633 usando Tapatalk
[/quote]

Hi Cavagnaro, Sorry abt a delayed reply...

My objective was to open WDE without launching it via direct executable file.

* I initially tried to call the WDE via command prompt (along with Host/port/Username/passw/place details passed as command arguments).

Ex: Open Command prompt > goto the WDE dir path and use the below Command line input..
-url tcp://<HOST>:<PORT>/<APPLICATIONNAME> -u <USERNAME> -p <PASSWORD> -place <PLACE>

* with aforesaid approach I was able to prove WDE can be invoked via command line.
* In my original post , the pseudo code I shared was trying to open a command prompt and do the same via .Net code.
* While doing so I got the Exception , to which I reached out for Genesys support help and they suggested to
set the  Directory.SetCurrentDirectory(WDE_INSTALLATION_PATH) to avoid the exception.

In my follow-up post I shared the latest code where I have tweaked a few lines ( Instead of opening a command line and passing the command line input syntax, I used createprocess functions to launch WDE  from code) along with Genesys Suggestion incorporated.

Just wanted to share it across , if it might benefit someone who could run into similar errors.

Thanks.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Need Help in Understanding the Unity Genesys exception information
« Reply #4 on: July 28, 2016, 11:12:25 AM »
Thanks for such detailed answer
Good luck!

Enviado de meu E6633 usando Tapatalk