Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
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 => {
		// Resolves with blank object
	} );
  })
})

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
	} );
	
})
})
  
  
Posted 2 years ago
Edited 2 years ago
Votes Newest

Answers 2


For your use-case, you should not be using multiple controllers this way. Instead, make use of the Service Interface documented at the link below and use the implement and invoke methods to achieve remote method calls.

https://docs.developers.symphony.com/building-extension-applications-on-symphony/overview-of-extension-api/extension-api-services/service-interface

  
  
Posted 2 years ago
Yong Sheng Tan
39 × 2 Administrator

Thanks for the update, I'll work accordingly. Is the position where I'm registering to remote service correct i.e. after application is registered or should I do it just after registering service?

  
  
Posted 2 years ago
2K Views
2 Answers
2 years ago
2 years ago
Tags