Announcement

Collapse
No announcement yet.

Redeploy channel in javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redeploy channel in javascript

    I know there is a possibility to start and stop a channel using javascript, but does anyonw know if there is a way to undeploy and deploy a channel using javascript?

  • #2
    Hello,

    You can use the engine controller.

    Code:
    var controllerFactory = com.mirth.connect.server.controllers.DefaultControllerFactory.getFactory();
    var engineController = controllerFactory.createEngineController();
    Then you can call deployChannels or undeployChannels, etc. with the list of channel IDs.

    Comment


    • #3
      Is it also possible to do an import this way?
      I found this code but did not test it yet:
      // // Import Channel
      // donkeyEngineController.doImport("testHttpChannel.x ml");
      // Channel testChannel = donkeyEngineController.getDonkeyChannels().get(0);
      // channelIds.add(testChannel.getChannelId());
      X Connections
      https://documentor.email
      https://www.x-connections.com

      Comment

      Working...
      X