* Added support for polymorphic type as workflow output * Update Linq expression to avoid unnecessary allocations. * Added caching as per PR comment