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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Help with Workflow Status Message in Thingworx and Thingworx Flow

GabrielAzevedo
3-Newcomer

Help with Workflow Status Message in Thingworx and Thingworx Flow

Hi,

I'm currently using Thingworx and Thingworx Flow, and I need assistance with a specific use case.

I have a workflow that is triggered when a user provides the required inputs and clicks a button. The workflow performs several integrations by making API requests.

The issue I’m facing is that I need to return a status message to the mashup, indicating whether the workflow completed all processing successfully or if an error occurred during execution.

Could you please guide me on how to implement this functionality? Specifically:

  1. How can I return this status message to the mashup for real-time feedback to the user?

Thank you for your help!

ACCEPTED SOLUTION

Accepted Solutions

Hey, you will need:

1. Let the mashup call a ThingWorx service, which will call your Flow. So you can create a result value how you want it for display in mashup

2. a non async Flow (so service execution waits for it)

nmutter_3-1734458492977.png

 

nmutter_2-1734458482541.png

 

3. in the output node set a baseType and whatever data you want to return. This may not be needed depending on what your flow behaves. maybe it throws an exception when something is not working. then catching the exception in step 4 will be sufficient. if no exception everything was fine. (depends)

nmutter_1-1734458457245.png

nmutter_0-1734458444787.png

4. also add a try catch around the call to flow to catch possible exceptions.

 

Then in the mashup, you e.g. call your service on button clicked. And the service could e.g. have a string return type. And on ServiceComplete Event you do show a StatusMessage with the return of the service. Or a confirmation. Or just a label,.. How you like

 

Hope this gives you an idea. Otherwise feel free to let us know on which step you have questions.

View solution in original post

2 REPLIES 2

Hey, you will need:

1. Let the mashup call a ThingWorx service, which will call your Flow. So you can create a result value how you want it for display in mashup

2. a non async Flow (so service execution waits for it)

nmutter_3-1734458492977.png

 

nmutter_2-1734458482541.png

 

3. in the output node set a baseType and whatever data you want to return. This may not be needed depending on what your flow behaves. maybe it throws an exception when something is not working. then catching the exception in step 4 will be sufficient. if no exception everything was fine. (depends)

nmutter_1-1734458457245.png

nmutter_0-1734458444787.png

4. also add a try catch around the call to flow to catch possible exceptions.

 

Then in the mashup, you e.g. call your service on button clicked. And the service could e.g. have a string return type. And on ServiceComplete Event you do show a StatusMessage with the return of the service. Or a confirmation. Or just a label,.. How you like

 

Hope this gives you an idea. Otherwise feel free to let us know on which step you have questions.

That was super helpful, it's what I needed, thanks a ton for sharing this! 

Announcements


Top Tags