Transform
The Transform task is a specialized component in OSPROV's workflow builder that enables data transformation and manipulation within your workflows. It allows you to apply predefined transformation operations to submission data, perform calculations, and prepare data for subsequent tasks without requiring user interaction.
Purpose
The Transform task is designed to:
- Apply predefined transformation operations to workflow submission data
- Perform calculations and data manipulations automatically
- Modify existing form fields with transformed values
- Create consistent data formats across submissions
- Automate data processing that would otherwise require manual intervention
Prerequisites
Before you can use a Transform task in your workflow, you need to have access to transform templates:
- Transform templates are predefined in the system by administrators
- Each transform template is associated with a specific transformation class
- Transform templates define the input parameters required for the transformation
- Common transform types include:
- Addition (mathematical operations)
- Concatenation (text combination)
- GUID Generation (unique identifier creation)
- Running Number Generation (sequential numbering)
Adding a Transform Task to Your Workflow
Basic Setup
- In the Workflow Builder, drag the Transform task from the task palette onto the canvas
- Click on the Transform task to open its configuration panel
- Configure the following required settings:
- Transform: Select the transform template you want to use from the dropdown menu
- Title for process: Enter a descriptive title that will appear in the submission history
- Label for status: (Optional) Override the default status label
Transform Selection
The transform selection determines what operation will be performed:
- Select from available transform templates in your organization
- Each template requires specific input parameters
- The input fields will dynamically update based on the selected transform
- Each transform has a specific purpose (addition, concatenation, etc.)
Input Configuration
After selecting a transform, you'll need to configure its inputs:
- Input fields are dynamically generated based on the selected transform
- Each input field has a specific label and purpose
- You can use placeholders like
[field_name]to reference form fields - For supplementary forms, use
[forms.N.field_name](e.g.,[forms.2.amount]) - System placeholders like
[YYYY],[MM],[DD]can be used for date values
Output Configuration
You must specify where the transformation result will be stored:
- Output: Enter the field name where the result should be saved
- The field must already exist in a previous form
- For main form fields, use
[field_name] - For supplementary forms, use
[forms.N.field_name](e.g.,[forms.2.total]) - The transformation result will overwrite any existing value in the output field
Advanced Settings
Visibility Settings
- Hide from submission history: When checked, prevents this transform task from appearing in the submission history
- Useful for keeping the submission history focused on user actions
- The transformation still occurs, but isn't visible in the history
- Helps reduce clutter in complex workflows with many tasks
How Transform Tasks Work
When a workflow reaches a Transform task:
- The system loads the selected transform template and its associated class
- The input values are processed, replacing any placeholders with actual submission data
- The transform class executes its operation on the inputs
- The result is saved to the specified output field in the submission data
- The workflow automatically proceeds to the next task
- If the transformation fails, the task is marked as invalid but the workflow still proceeds
Unlike action tasks (Approve, Review, Process), Transform tasks:
- Do not appear in users' task lists
- Do not require any user action to complete
- Execute automatically and immediately
- Modify the submission data that subsequent tasks will use
Available Transform Types
OSPROV includes several built-in transform types:
Addition Transform
- Purpose: Performs mathematical addition on numeric values
- Inputs: Multiple numeric values (a, b, c)
- Output: The sum of all input values
- Use Case: Calculate totals, aggregate values, compute sums
Concatenation Transform
- Purpose: Combines multiple text strings into a single string
- Inputs: Multiple text strings (a, b, c, d, e)
- Output: All input strings joined together
- Use Case: Create composite identifiers, combine name parts, build formatted text
GUID Generation Transform
- Purpose: Generates a globally unique identifier (GUID)
- Inputs: None or configuration parameters
- Output: A new GUID string
- Use Case: Create unique identifiers for records, generate reference numbers
Running Number Transform
- Purpose: Generates sequential numbers with customizable formatting
- Inputs: Prefix, suffix, starting number, etc.
- Output: A formatted sequential number
- Use Case: Create invoice numbers, ticket IDs, sequential identifiers
Use Cases
Automated Calculations
Use Transform tasks to perform calculations automatically:
- Calculate totals from line items
- Compute tax amounts based on values
- Determine discounts or surcharges
- Calculate date differences or durations
Text Formatting and Combination
Create formatted text strings automatically:
- Combine first and last names into a full name
- Format addresses from individual components
- Create standardized reference numbers
- Build display labels from multiple fields
Unique Identifier Generation
Generate unique identifiers for submissions:
- Create transaction reference numbers
- Generate case IDs with custom formatting
- Build sequential document numbers
- Create unique identifiers for integration with other systems
Data Preparation for Subsequent Tasks
Prepare data for use in later workflow steps:
- Format data for display in review forms
- Prepare values for external system integration
- Transform data to meet specific format requirements
- Create derived values for decision-making
Best Practices
- Strategic placement: Position transform tasks immediately before tasks that need the transformed data
- Clear naming: Use descriptive titles that indicate what transformation is being performed
- Input validation: Ensure that input fields will contain appropriate data types for the transformation
- Output field selection: Choose output fields carefully to avoid overwriting important data
- Error handling: Consider what happens if input data is missing or invalid
- Testing: Test transformations with different input scenarios to ensure they produce expected results
Troubleshooting
Transformation Not Occurring
If a transformation isn't occurring:
- Verify that the transform template exists and is correctly selected
- Check that input placeholders correctly reference existing form fields
- Ensure field names are spelled correctly (they are case-sensitive)
- Check the system logs for any errors during transformation execution
Unexpected Transformation Results
If transformation results are not as expected:
- Check that input fields contain the expected data types (numbers vs. text)
- Verify that placeholders are correctly formatted (e.g.,
[field_name]) - Test the transformation with simple values to isolate the issue
- Ensure the transform class is functioning correctly
Output Not Being Saved
If the transformation result isn't being saved:
- Verify that the output field exists in a previous form
- Check that the output field name is correctly specified
- Ensure the output field format matches the transformation result type
- Confirm that the workflow is proceeding through the transform task
Related Features
- Form Tasks: Create forms that collect data for transformations
- Conditional Tasks: Route workflows based on transformed data
- Hook Tasks: Alternative for more complex transformations requiring custom code
Summary
The Transform task is a powerful component in OSPROV's workflow builder that enables automated data manipulation within your workflows. By applying predefined transformation operations to submission data, you can perform calculations, format text, generate unique identifiers, and prepare data for subsequent tasks without requiring user interaction.
Unlike action tasks that require user input, transform tasks execute automatically and modify the submission data that subsequent tasks will use. This makes them ideal for automated calculations, text formatting, identifier generation, and data preparation throughout your business processes.