Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi ,
The bounded service in Mashup will popup the exception message raised from the ThingWorx javascript service , it's default behavior.
I want to use a customized message box to display the exception message , but how does the customized widget catch the exception of the ThingWorx service ?
Regards,
Sean
Hi @seanccc.
Can you provide details of the use case? What happens when the service runs successfully? What are some of the error messages you need to display? This may help us to provide a better example of how to meet your requirements.
Regards.
--Sharon
The ThingWorx service can only set fix successful message which display in the mashup. I want do display a customized message because:
So I want to know if there's a general way to catch the result of the service, whatever it's successful or failed. Then I can display the result in a customized widget(message box).
Regards,
Sean
@seanccc Hello,
can be achieved it in many ways,
This way, you don't have to worry about any bindings and service output conversions or any other expressions.
Hope this works for you.
Think you for your suggestions, but they're still not general I think.
Each service call in the mashup has to take care the of result to do something to trigger the popup message. But it should be done by only calling ' throw new Error("This is an error"); ' in the javascript service. This is actually the default behavior of ThingWorx, but I need to customize the default status message box(box size, text, position, modal popup) and won't introduce duplicate settings in mashup for each service.
Hi Sean,
You can make your design to a better informative system. Irrespective of service status, show the message such as if it successful set success message in your service, else set error message to the session.
In mashup, after each service execution event give it to your message box.
If you just want to show error message then set error message to the session in your service. In mashup you have to add validator whether to show message box or not.
Hi @seanccc.
If you feel your question has been answered, please mark the Accepted Solution for the benefit of others with the same question.
Thank you for your participation in our community!
Regards.
--Sharon