cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Dynamically binding to an entity for services issue

khayes1
15-Moonstone

Dynamically binding to an entity for services issue

Hi,

I have a mashup that has the name of a thing as a mashup parameter which I use as the EntityName parameter for some dynamic services.

The problem I am having is that the binding doesn't appear to be working correctly (i.e. service do not run when called). When I look at the connections in the 'connections' window I see some odd things (see below). The connection appears to be okay for only one of the templated things.

When called, only the services for the last dynamic thing (LinxRemotePrinterTemplate) run. They used to be fine and all run correctly, but now any time I try to use the first two templates dynamically I get the same binding issue.

Has anyone seen this before, and have any idea how i might fix this?

Thx.

6 REPLIES 6
posipova
20-Turquoise
(To:khayes1)

Not quite sure I understand the scenario fully. Could you please attach an export of related entities for  demonstration? Have you modified any of the templates recently?

khayes1
15-Moonstone
(To:posipova)

Hi Polina,

thanks for the quick reply. Yes I have been modifying the services in the templates (parameters and code) of both of the templates which no longer seem to work. i did wonder if they had been corrupted when trying to save or something.

I'll try to explain it a little more clearly. i'll just talk about one of the templates, as I think the problem is the same on both.

I have a mashup that calls some dynamic services on things based on a 'Distributor Template'.

The first service is called when the mashup is loaded.

The mashup itself has a parameter which is the name of the thing on which I wish to run the service. This is bound to the 'EntityName' parameter (see above) of the dynamic service. When i load the mash up I can see that the service doesn't run (I have a debug statement as the first line of the service which doesn't appear in the logs). When I look at the 'connections' window in the mashup composer where I would normally see a blue arrow from the mashup parameter to the service EntityName all I see is the 'remove binding' button but no blue arrow  (see original post). It's like the binding has been corrupted?

When you say to attach an export do you mean an .xml file of the template in question?

K

posipova
20-Turquoise
(To:khayes1)

Can you try to remove those template services from the mashup completely using this button

And then re-add and rebind?

Yes I meant the export (xml or binary) of the faulty template, mashup, and dependent entities I would need to see the issue.

khayes1
15-Moonstone
(To:khayes1)

Hi,

I have tried a number of things to solve the issue:

  1. removing the services completely saving then adding back but it still persists.
  2. I've also tried creating new mashups using the same template services (dynamic) and the problem is always present.
  3. I can run the services directly via the composer using an instance (of the template) services 'Test' button. They work okay.
  4. I've tried shutting the composer down and restarting it. Issue persists.

I have attached the xml files of the mashup & the template. Thanks again for looking at this, I appreciate it.

posipova
20-Turquoise
(To:khayes1)

Was the Distributor Template created in the same version/system or was it imported from a different version? If you duplicate the template (using the "duplicate" function of the composer - let me know if you need help on that) - and use that new template in the mashup, does it work?

khayes1
15-Moonstone
(To:posipova)

No it wasn't imported from another version of Thingworx. I did duplicate the template, and then used that in a mashup, but the result was the same unfortunately.

K

Announcements


Top Tags