Analysis Block Categories
Explore different block types including filters, calculators, and alert configurations. Learn about each type's capabilities, configuration options, and creation endpoints.
Filter Blocks
POST /api/{tenantId}/{projectId}/block/filter
Filter blocks apply data filtering criteria to datasets, reducing data by applying conditions such as date ranges, value filters, or logical expressions. They are the foundation for focused analysis on specific data subsets.
Capabilities
- Date Range Filtering: Filter data within specific time periods
- Activity Filtering: Include or exclude specific process activities
- Case Attribute Filtering: Filter based on case properties and metadata
- Value Range Filtering: Apply numeric and text value conditions
- Complex Logic: Combine multiple filters with AND/OR operations
Request Body
{
"notebookId": "660e8400-e29b-41d4-a716-446655440000",
"blockTitle": "Date Range Filter",
"blockDescription": "Filters process data for the last 30 days"
}
Configuration Examples
// Date range filter configuration
{
"filterType": "dateRange",
"startDate": "2024-01-01T00:00:00Z",
"endDate": "2024-01-31T23:59:59Z",
"dateField": "timestamp"
}
// Activity filter configuration
{
"filterType": "activity",
"include": ["Order Created", "Payment Processed"],
"exclude": ["System Log"]
}
// Case attribute filter configuration
{
"filterType": "caseAttribute",
"attribute": "customerType",
"operator": "equals",
"value": "Premium"
}
Calculator Blocks
POST /api/{tenantId}/{projectId}/block/calculator
Calculator blocks perform mathematical operations and analytical calculations on datasets. They compute metrics, aggregations, statistical measures, and derived values for process mining analysis.
Capabilities
- Duration Calculations: Process cycle times and lead times
- Frequency Analysis: Activity occurrence rates and patterns
- Performance Metrics: Throughput, efficiency, and utilization
- Statistical Analysis: Mean, median, percentiles, and distributions
- Custom Formulas: Complex mathematical expressions and KPIs
Request Body
{
"notebookId": "660e8400-e29b-41d4-a716-446655440000",
"blockTitle": "Process Duration Calculator",
"blockDescription": "Calculates average case duration and cycle times"
}
Configuration Examples
// Duration calculation configuration
{
"calculationType": "duration",
"startActivity": "Order Created",
"endActivity": "Order Completed",
"unit": "hours",
"aggregation": "average"
}
// Frequency calculation configuration
{
"calculationType": "frequency",
"groupBy": "activity",
"timeWindow": "daily",
"metric": "count"
}
// Custom KPI calculation configuration
{
"calculationType": "custom",
"formula": "(completedCases / totalCases) * 100",
"resultUnit": "percentage",
"name": "Completion Rate"
}
Alert Blocks
POST /api/{tenantId}/{projectId}/block/alert
Alert blocks monitor data conditions and trigger notifications when specific criteria are met. They provide automated monitoring and exception detection for process mining workflows and compliance requirements.
Capabilities
- Threshold Monitoring: Alert when metrics exceed defined limits
- Pattern Detection: Identify unusual process behavior patterns
- Compliance Monitoring: Track adherence to business rules
- Performance Alerts: Monitor SLA violations and performance degradation
- Real-time Notifications: Immediate alerts for critical conditions
Request Body
{
"notebookId": "660e8400-e29b-41d4-a716-446655440000",
"blockTitle": "SLA Violation Alert",
"blockDescription": "Alerts when case duration exceeds SLA threshold"
}
Configuration Examples
// Threshold alert configuration
{
"alertType": "threshold",
"metric": "caseDuration",
"operator": "greaterThan",
"threshold": 48,
"unit": "hours",
"severity": "high"
}
// Pattern deviation alert configuration
{
"alertType": "patternDeviation",
"baselinePattern": "Order -> Payment -> Fulfillment",
"deviationTolerance": 0.1,
"minOccurrences": 10
}
// Compliance alert configuration
{
"alertType": "compliance",
"rule": "approvalRequired",
"condition": "amount > 1000",
"requiredActivity": "Manager Approval"
}
Block Type Comparison
Choose the right block type for your analysis needs:
| Block Type | Primary Purpose | Input | Output | Use Cases |
|---|---|---|---|---|
| Filter | Data reduction and focusing | Full dataset | Filtered dataset | Time period analysis, specific process paths |
| Calculator | Metrics and KPI computation | Dataset (filtered or full) | Calculated values/metrics | Performance measurement, statistical analysis |
| Alert | Monitoring and notifications | Metrics or dataset | Alert conditions/notifications | SLA monitoring, exception detection |
Example: Complete Block Workflow
This example demonstrates creating different block types for a comprehensive analysis:
// Create a filter block to focus on recent data
const createDateFilter = async (notebookId) => {
const response = await fetch(`/api/${tenantId}/${projectId}/block/filter`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
notebookId: notebookId,
blockTitle: 'Last 30 Days Filter',
blockDescription: 'Focus analysis on recent process data'
})
});
return await response.json();
};
// Create a calculator block to compute metrics
const createDurationCalculator = async (notebookId) => {
const response = await fetch(`/api/${tenantId}/${projectId}/block/calculator`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
notebookId: notebookId,
blockTitle: 'Average Duration Calculator',
blockDescription: 'Calculate average case processing time'
})
});
return await response.json();
};
// Create an alert block for monitoring
const createSLAAlert = async (notebookId) => {
const response = await fetch(`/api/${tenantId}/${projectId}/block/alert`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
notebookId: notebookId,
blockTitle: 'SLA Violation Alert',
blockDescription: 'Monitor for SLA breaches'
})
});
return await response.json();
};
// Build complete analysis workflow
const buildAnalysisWorkflow = async (notebookId) => {
try {
// 1. Filter data to recent period
const filterBlock = await createDateFilter(notebookId);
console.log('Created filter block:', filterBlock.blockId);
// 2. Calculate performance metrics
const calculatorBlock = await createDurationCalculator(notebookId);
console.log('Created calculator block:', calculatorBlock.blockId);
// 3. Set up monitoring alerts
const alertBlock = await createSLAAlert(notebookId);
console.log('Created alert block:', alertBlock.blockId);
return {
filter: filterBlock,
calculator: calculatorBlock,
alert: alertBlock
};
} catch (error) {
console.error('Error building workflow:', error);
throw error;
}
};
Python Implementation
import requests
from typing import Dict, Any
class BlockTypeManager:
def __init__(self, base_url: str, tenant_id: str, project_id: str, token: str):
self.base_url = base_url
self.tenant_id = tenant_id
self.project_id = project_id
self.headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
def create_filter_block(self, notebook_id: str, title: str, description: str) -> Dict[str, Any]:
"""Create a filter block for data reduction"""
url = f"{self.base_url}/api/{self.tenant_id}/{self.project_id}/block/filter"
payload = {
'notebookId': notebook_id,
'blockTitle': title,
'blockDescription': description
}
response = requests.post(url, json=payload, headers=self.headers)
response.raise_for_status()
return response.json()
def create_calculator_block(self, notebook_id: str, title: str, description: str) -> Dict[str, Any]:
"""Create a calculator block for metrics computation"""
url = f"{self.base_url}/api/{self.tenant_id}/{self.project_id}/block/calculator"
payload = {
'notebookId': notebook_id,
'blockTitle': title,
'blockDescription': description
}
response = requests.post(url, json=payload, headers=self.headers)
response.raise_for_status()
return response.json()
def create_alert_block(self, notebook_id: str, title: str, description: str) -> Dict[str, Any]:
"""Create an alert block for monitoring"""
url = f"{self.base_url}/api/{self.tenant_id}/{self.project_id}/block/alert"
payload = {
'notebookId': notebook_id,
'blockTitle': title,
'blockDescription': description
}
response = requests.post(url, json=payload, headers=self.headers)
response.raise_for_status()
return response.json()
def create_analysis_pipeline(self, notebook_id: str) -> Dict[str, Any]:
"""Create a complete analysis pipeline with all block types"""
pipeline = {}
# Create filter block
pipeline['filter'] = self.create_filter_block(
notebook_id,
'Data Filter',
'Filter dataset for analysis scope'
)
# Create calculator block
pipeline['calculator'] = self.create_calculator_block(
notebook_id,
'Performance Calculator',
'Calculate key performance metrics'
)
# Create alert block
pipeline['alert'] = self.create_alert_block(
notebook_id,
'Performance Alert',
'Monitor performance thresholds'
)
return pipeline
# Usage example
block_manager = BlockTypeManager(
'https://your-mindzie-instance.com',
'tenant-guid',
'project-guid',
'your-auth-token'
)
# Create complete analysis pipeline
pipeline = block_manager.create_analysis_pipeline('notebook-guid')
print(f"Created pipeline with {len(pipeline)} blocks")
Important Notes
Block Dependencies: Blocks can be chained together where filter blocks reduce data, calculator blocks compute metrics, and alert blocks monitor the results for exceptions.
Best Practice: Start with filter blocks to reduce data scope, then use calculator blocks for analysis, and finally add alert blocks for ongoing monitoring and notifications.