clsAzureMLGetSentiment Step
Description:
The Sentiment Analysis workflow step performs sentiment analysis and opinion mining on supplied text and stores the resulting information in workflow Variables or Global variables.
The step supports:
- Providing text for sentiment analysis.
- Storing the sentiment analysis result in a Variable or Global variable.
- Storing the sentiment score in a Variable or Global variable.
- Using the resulting sentiment information in subsequent workflow activities.
- Returning a True or False result for subsequent workflow processing.
Inputs
- varGlobalToStoreValue– Specifies the Variable or Global variable in which the sentiment analysis result should be stored.
- Sentiment Text – Specifies the text that should be analyzed for sentiment.
- varGlobalScore – Specifies the Variable or Global variable in which the sentiment score should be stored.
Returns
- True – The True return path can be connected to the next workflow activity when the sentiment analysis operation succeeds.
- False – The False return path can be used for an alternative workflow path or error-handling logic when the sentiment analysis operation does not succeed.
Usage:
The Sentiment Analysis step is typically placed after a workflow collects, generates, or retrieves text.
The input text is supplied to the step, the sentiment analysis operation is performed, and the resulting sentiment and score are stored in the configured Variable or Global variables.
A typical workflow pattern is:
Get Text → Sentiment Analysis → Process Sentiment Result
The resulting values can then be used by later workflow steps to:
- Store sentiment information.
- Evaluate customer or user feedback.
- Generate notifications.
- Route workflow processing.
- Record sentiment scores.
- Perform additional processing based on the analysis result.
- Pass sentiment information to another workflow activity.

To use this step, set up an Azure ML service in the FlowWright application. Go to the Status > Settings > Configuration page. Select the Azure ML category from the drop-down menu. Click here to learn more about the Azure ML and Cognitive Service subscription.
A sample Azure ML configuration is provided here for reference.

Typical Workflow Suggestions:
Analyze Customer Feedback
Use this step to analyze customer feedback collected through a form or another workflow activity.
Example:
Collect Customer Feedback → Sentiment Analysis → Process Feedback
You can supply the submitted feedback as the sentiment text, and the resulting sentiment and score are stored for later processing.
Analyze Support Ticket Comments
Use this step to analyze text entered as part of a support ticket or service request.
Example:
Get Ticket Comments → Sentiment Analysis → Route Ticket
The workflow can use the resulting sentiment information to support subsequent ticket-processing activities.
Store Sentiment Results for Reporting
Use this step when sentiment results need to be retained for later reporting or analysis.
Example:
Retrieve Feedback → Sentiment Analysis → Store Sentiment Result
The sentiment result and score can be stored in separate Variables or Global variables as configured in the step. clsAzureMLGetSentiment
Route Workflow Processing Based on Sentiment
Use the sentiment analysis step as part of a workflow that requires different processing paths for different types of analyzed text.
Example:
Analyze Feedback → Sentiment Analysis → Evaluate Result → Continue Appropriate Process
Subsequent workflow activities can use the stored sentiment result and score to determine the appropriate processing.
Analyze Text Before Sending a Notification
Use the step before a notification activity when the workflow needs to analyze text before continuing with notification or communication processing.
Example:
Get Message Text → Sentiment Analysis → Prepare Notification
You can store the sentiment result and score and make them available to downstream workflow activities.
Example:
Let’s build and execute the “clsAzureMLGetSentimentDef” example.
- Create a new process definition named “clsAzureMLGetSentimentDef” and open it in designer mode.
- Drag a “clsAzureMLGetSentiment” step to the canvas.
- Connect the dots between the “Start” and “clsAzureMLGetSentiment” steps, as shown above.
- Define a variable or a global to store the result.
- Click the "clsAzureMLGetSentiment" step to configure its "Required" properties. Provide a name for the step, the English text, and a variable or global reference to store the result and the score. Click the Save button. Note: Click the "AI Predict" button for Copilot to add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the Process Definition, create a new process instance, and execute it. When the workflow reaches the Sentiment Analysis step, it analyzes the supplied text and stores the resulting sentiment and score in the configured Variables or Global variables. Use the stored values in subsequent workflow activities.

Tips:
- Provide meaningful text for sentiment analysis.
-
Use a meaningful Variable or Global name for the sentiment result, such as
sentimentResult. -
Use a separate meaningful Variable or Global name for the score, such as
sentimentScore. - Verify that both result destinations are configured before executing the workflow.
- Keep the sentiment text focused on the content that needs to be analyzed.
- Test the workflow with representative positive, negative, and neutral text.
- Verify the stored sentiment result before using it in downstream activities.
- Verify the stored score before using it for subsequent processing.
- Connect the True return path to the next processing activity.
- Connect the False return path to appropriate alternative or error-handling logic.
- Do not assume a particular score range or sentiment classification format unless it has been verified against the FlowWright implementation.
- Test downstream routing logic with representative sentiment-analysis results.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: After the import, verify and complete any missing configurations, such as file path references and database connections. Then, save the definition to confirm the changes.
Click here to download the sample file.