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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Visualize service errors in Mashup

Raccone
10-Marble

Visualize service errors in Mashup

Dear devs,

 

I am currently developing a dashboard (mashups) with textboxed, bound to buttons that in turn call services. As for now, I show success/error message from another textbox. but I would like to beautify the design and therefore add some popup/snackbar to display messages. However, I could not find any widget to help me with this. Am I missing something?

 

Thanks and best regards!

1 ACCEPTED SOLUTION

Accepted Solutions

You can follow steps as below:

 

  1. Create mashup based on your requirement which contains text area, if required add ok button to acknowledge the message, on click of button closeifmashup.
  2. Use navigator in actual mashup and provide above created mashup  and render it as popup. 
  3.  Pass service output to popup mashup using mashup parameters or session parameters.
  4. Bind service execution event to navigate to that popup message.

Hope this works for you.

View solution in original post

7 REPLIES 7

@Raccone  You can use status messages as default. If you need some fancy UI to display the messages based on error, warning or success message, then you have to create a mashup based on your requirements. Bind service invoke complete event to navigate to this mashup and service output message which will be shown as popup.

 

Hey @abhiramk,

 

Those services are designed to have a return of type string, being max 50-60 characters-ish, and I would like to keep it like that.

 

I'd go for the second option, but I'm not quite sure of what you mean. I understand the logic, but I wouldn't know what widgets to use in this new Mashup, which was the main point of my question.

 

Thanks!

You can follow steps as below:

 

  1. Create mashup based on your requirement which contains text area, if required add ok button to acknowledge the message, on click of button closeifmashup.
  2. Use navigator in actual mashup and provide above created mashup  and render it as popup. 
  3.  Pass service output to popup mashup using mashup parameters or session parameters.
  4. Bind service execution event to navigate to that popup message.

Hope this works for you.

Hi @abhiramk,

 

Seems cool to me. Just a couple of points I'm missing - and it's not you fault -:

  1. I always intended the mashup as a full screen page. How can I make a mashup only one window? Will it recognize the non-empty areas only or will I have to define something else?
  2. What's the correct approach to "beautify" such window? For example, making it with a red border if the window says error or green in positive case.

 

Thanks a lot!

@Raccone 

 

When you're using navigation widget and providing mashup name, load it as popup by giving in properties.

Coming to styling, you can define style and state definitions use it accordingly. UI design and colors you can make however you want.

Also you can use custom css.

Hi @abhiramk,

 

Thanks, I will try it out and come back if I have any doubts. Anyway, does a navigation widget exist? I usually implement navigation using navigation functions.

 

Thanks,

Federico

Raccone
10-Marble
(To:Raccone)

Hi @abhiramk,

 

I understood and implemented your approach. I have only one doubt, being that in a given page I might have output coming from several services, but I can bind the text source for the area only once per service result. The only thing that could solve this, would be to create e popup mashup for every service output. Is there a better way to do it?

 

Edit: I solved this using an EventsRouter function.

 

Thanks,

Federico

Top Tags