support database serialization for task and workflow