activateWorkflow method
Activate a workflow
Implementation
Future<Response> activateWorkflow(String id, {
String? versionId,
String? name,
String? description,
}) async {
try {
final response = await _dio.post(
'/workflows/$id/activate',
data: {
if (versionId != null) 'versionId': versionId,
if (name != null) 'name': name,
if (description != null) 'description': description,
},
);
return response;
} on DioException catch (e) {
throw Exception('Failed to activate workflow: ${e.message}');
}
}