Not Able to register remote service
Not Able to register remote service
Hi, I'm trying to create a remote service in one extension app and subscribing it in another which unfortunately is not working. Following is the snippet:
Source Code Controller file of App A (remote service creator)
```javascript
const appControllerName = `${appName}:controller`
const appService = SYMPHONY.services.register(controllerName);
const customControllerName = 'custom:controller'
const customService = SYMPHONY.services.register(customControllerName);
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'applications-nav' ], [ controllerName ])
.then((response) => {
const modulesService = SYMPHONY.services.subscribe('modules')
const navService = SYMPHONY.services.subscribe('applications-nav')
navService.add('my-app-nav', 'Hello World', controllerName)
appService.implement({
select: () => {
modulesService.show(
'helloWorldApp',
{ title: 'Hello World App' },
controllerName,
'https://localhost:8080/index.html',
{ 'canFloat': true }
)
},
})
customService.implement({
testMethod: () => {
// Do Something
}
})
SYMPHONY.remote.register(customControllerName).then( resp => {
// Resolves with blank object
} );
})
})
```
Source Code of App B (remote service subscriber)
```javascript
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'custom:controller' ], [])
.then((response) => {
SYMPHONY.remote.subscribe('custom:controller').then( resp => {
const service = SYMPHONY.services.subscribe('custom:controller');
// Doesn't work
} );
})
})
```
Hi, I'm trying to create a remote service in one extension app and subscribing it in another which unfortunately is not working. Following is the snippet:
Source Code Controller file of App A (remote service creator)
```javascript
const appControllerName = `${appName}:controller`
const appService = SYMPHONY.services.register(controllerName);
const customControllerName = 'custom:controller'
const customService = SYMPHONY.services.register(customControllerName);
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'applications-nav' ], [ controllerName ])
.then((response) => {
const modulesService = SYMPHONY.services.subscribe('modules')
const navService = SYMPHONY.services.subscribe('applications-nav')
navService.add('my-app-nav', 'Hello World', controllerName)
appService.implement({
select: () => {
modulesService.show(
'helloWorldApp',
{ title: 'Hello World App' },
controllerName,
'https://localhost:8080/index.html',
{ 'canFloat': true }
)
},
})
customService.implement({
testMethod: () => {
// Do Something
}
})
SYMPHONY.remote.register(customControllerName)then( resp => {
// Never Resolves
} );
})
})
```
Source Code of App B (remote service subscriber)
```javascript
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'custom:controller' ], [])
.then((response) => {
SYMPHONY.remote.subscribe('custom:controller').then( resp => {
const service = SYMPHONY.services.subscribe('custom:controller');
// Doesn't work
} );
})
})
```
#extension-app
Not Able to register remote service
Not Able to register remote service
Hi, I'm trying to create a remote service in one extension app and subscribing it in another which unfortunately is not working. Following is the snippet:
Source Code Controller file of App A (remote service creator)
```javascript
const appControllerName = `${appName}:controller`
const appService = SYMPHONY.services.register(controllerName);
const customControllerName = 'custom:controller'
const customService = SYMPHONY.services.register(customControllerName);
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'applications-nav' ], [ controllerName ])
.then((response) => {
const modulesService = SYMPHONY.services.subscribe('modules')
const navService = SYMPHONY.services.subscribe('applications-nav')
navService.add('my-app-nav', 'Hello World', controllerName)
appService.implement({
select: () => {
modulesService.show(
'helloWorldApp',
{ title: 'Hello World App' },
controllerName,
'https://localhost:8080/index.html',
{ 'canFloat': true }
)
},
})
customService.implement({
testMethod: () => {
// Do Something
}
})
SYMPHONY.remote.register(customControllerName)then( resp => {
// Never Resolves
} );
})
})
```
Source Code of App B (remote service subscriber)
```javascript
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'custom:controller' ], [])
.then((response) => {
SYMPHONY.remote.subscribe('custom:controller').then( resp => {
const service = SYMPHONY.services.subscribe('custom:controller');
// Doesn't work
} );
})
})
```
Hi, I'm trying to create a remote service in one extension app and subscribing it in another which unfortunately is not working. Following is the snippet:
Source Code Controller file of App A (remote service creator)
const appControllerName = `${appName}:controller`
const appService = SYMPHONY.services.register(controllerName);
const customControllerName = 'custom:controller'
const customService = SYMPHONY.services.register(customControllerName);
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'applications-nav' ], [ controllerName ])
.then((response) => {
const modulesService = SYMPHONY.services.subscribe('modules')
const navService = SYMPHONY.services.subscribe('applications-nav')
navService.add('my-app-nav', 'Hello World', controllerName)
appService.implement({
select: () => {
modulesService.show(
'helloWorldApp',
{ title: 'Hello World App' },
controllerName,
'https://localhost:8080/index.html',
{ 'canFloat': true }
)
},
})
customService.implement({
testMethod: () => {
// Do Something
}
})
SYMPHONY.remote.register(customControllerName)then( resp => {
// Never Resolves
} );
})
})
Source Code of App B (remote service subscriber)
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'custom:controller' ], [])
.then((response) => {
SYMPHONY.remote.subscribe('custom:controller').then( resp => {
const service = SYMPHONY.services.subscribe('custom:controller');
// Doesn't work
} );
})
})
#question
Not Able to register remote service
Hi, I'm trying to create a remote service in one extension app and subscribing it in another which unfortunately is not working. Following is the snippet:
Source Code Controller file of App A (remote service creator)
const appControllerName = `${appName}:controller`
const appService = SYMPHONY.services.register(controllerName);
const customControllerName = 'custom:controller'
const customService = SYMPHONY.services.register(customControllerName);
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'applications-nav' ], [ controllerName ])
.then((response) => {
const modulesService = SYMPHONY.services.subscribe('modules')
const navService = SYMPHONY.services.subscribe('applications-nav')
navService.add('my-app-nav', 'Hello World', controllerName)
appService.implement({
select: () => {
modulesService.show(
'helloWorldApp',
{ title: 'Hello World App' },
controllerName,
'https://localhost:8080/index.html',
{ 'canFloat': true }
)
},
})
customService.implement({
testMethod: () => {
// Do Something
}
})
SYMPHONY.remote.register(customControllerName)then( resp => {
// Never Resolves
} );
})
})
Source Code of App B (remote service subscriber)
SYMPHONY.remote.hello().then(() => {
SYMPHONY.application
.register(appName, [ 'modules', 'custom:controller' ], [])
.then((response) => {
SYMPHONY.remote.subscribe('custom:controller').then( resp => {
const service = SYMPHONY.services.subscribe('custom:controller');
// Doesn't work
} );
})
})