Map<String, dynamic> toMap() { return { 'taskId': taskId, 'tag': tag, 'handle': handle.toRawHandle, 'args': args?.toRawMap(), }; }