关于Viewflow 1.6.0中Processes和Tasks新增字段的可用性问询
data and artifact Fields User-Facing or Internal? Great question—let’s clear this up for you:
- The short version: Both the
dataJSON field and the generic foreign keyartifactfield are meant for library users to leverage—they’re not restricted to internal Viewflow operations.
What Each Field Does
data JSON Field
This is a flexible, catch-all storage spot for custom process or task data. Instead of having to create custom subclasses of Viewflow’s Process or Task models just to add extra fields, you can dump any arbitrary JSON data here. It’s ideal for dynamic information that doesn’t fit into rigid database columns—think user inputs, workflow state flags, or temporary data that changes per process instance.
artifact Generic Foreign Key
This field lets you link your workflow processes/tasks to any other model in your Django project (like an Order, Customer, or Invoice). It’s a handy way to tie your workflow directly to the core business objects it’s managing, without having to add separate foreign key fields for every possible model type you might want to connect.
Why You Might Not Find This in Docs/Issues
Viewflow 1.6.0 added these as user-facing extension points, but sometimes such features get rolled out with light initial documentation while the team collects feedback from developers using them. The best place to confirm details would be the project’s CHANGELOG for 1.6.0 (included in the repository), where release-specific user-facing features are usually highlighted.
内容的提问来源于stack exchange,提问作者Shaheed Haque

