Starting Workflows
Overview
This guide covers how to initiate utility measurement workflows in your application. All workflows are started through the CloneablePlatform instance and return results asynchronously.
Prerequisites
Before starting any workflow, ensure:
Authentication: User is authenticated with the platform
Permissions: Camera, location, and motion permissions are granted
UI Wrapper: Content is wrapped in
CloneableWorkflowWrapperPlatform Ready: CloneablePlatform is fully initialized
Basic Setup
SwiftUI Integration
import SwiftUI
import CloneablePlatformiOS
struct UtilityMeasurementView: View {
@EnvironmentObject var cloneable: CloneablePlatform
@State private var isWorkflowActive = false
var body: some View {
// Essential: Wrap your content in CloneableWorkflowWrapper
CloneableWorkflowWrapper(cloneablePlatform: cloneable) {
VStack(spacing: 20) {
// Your UI content here
utilityWorkflowButtons
}
}
}
private var utilityWorkflowButtons: some View {
VStack(spacing: 16) {
Button("Measure Pole") {
Task { await startPoleMeasurement() }
}
.disabled(isWorkflowActive)
Button("Measure Midspan") {
Task { await startMidspanMeasurement() }
}
.disabled(isWorkflowActive)
Button("Measure Guy Wire") {
Task { await startGuyMeasurement() }
}
.disabled(isWorkflowActive)
}
}
}Pole/Vertical Measurements
Basic Pole Measurement
High-Accuracy Pole Measurement
Pole Measurement with Custom Inventory
Midspan Measurements
Basic Midspan Measurement
High-Accuracy Midspan with Conductor Types
Guy Anchor Measurements
Basic Guy Wire Measurement
Guy Anchor Measurement with Location Context
Workflow State Management
Managing Active Workflows
Result Processing Examples
Basic Result Processing
Last updated

