Author Topic: PSDK : is it possible to stop/start solutions through Genesys PSDK  (Read 3139 times)

Offline kumar.aj876

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Hi Team,

is it possible to stop/start solutions through Genesys PSDK? if yes, can someone please guide me documentation to achieve this solution.


Thanks
Kumar

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: PSDK : is it possible to stop/start solutions through Genesys PSDK
« Reply #1 on: January 06, 2022, 09:57:58 PM »
You could use SolutionControlServerProtocol + RequestStartSolution classes - there is a doc about using SolutionControlServerProtocol (although without an example with the RequestStartSolution) on https://docs.genesys.com/Documentation/PSDK/latest/Developer/ManagementServer

Take a look on the chapter "Monitoring Your Application with Solution Control Server".

Once you have created and opened your SolutionControlServerProtocol, you can instantiate the RequestStartSolution with something like this:
[code]
RequestStartSolution request = RequestStartSolution.Create(101); /* Where 101 is the DBID of your solution. If you need to get the DBID programatically, you would need to query against ConfServerProtocol and ConfService */

IMessage result = scsProtocol.Request(request); /* scsProtocol is the instance of your SolutionControlServerProtocol, already configured and opened */
[/code]



Does it need to be through PSDK though? There is a tool called mlcmd installed along with Solution Control Server in which you can start/stop solutions through command line.
Doc: https://docs.genesys.com/Documentation/FR/latest/MLUG/mlcmdCLI

If you do choose to go by this tool, the syntax would be something like this:
[code]
./mlcmd_64 -cshost 10.0.0.1 -csport 2020 -csappname default -csuser your_username_here -cspassword your_password_here -scshost 10.0.0.2 -scsport 7000 -startsol your_solution_name_here
[/code]
Change 10.0.0.1 above to your Config Server host (either hostname or IP address) and 10.0.0.2 to your Solution Control Server host (also either hostname or IP address)
Change 2020 to your Config Server port
Change 7000 to your Solution Control Server port