You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #54, there is a plea to provide access to the action instances for the current state of a workflow in order to be able to access extra properties.
Once access to actions has been established, it makes sense to promote the methods fields(), optional_fields() and required_fields() from private to public: using the same reasoning as used in #54, these methods provide information a UI or other consumer of the workflow could use for user interaction.
Bugs and Issues
Specify what version was used
1.49
The text was updated successfully, but these errors were encountered:
ehuelsmann
added a commit
to ehuelsmann/perl-workflow
that referenced
this issue
Jan 19, 2021
…ds as public
By reclassifying these methods as public, they become available for
consumers of Workflow. This makes sense once the action instances
become accessible by callers in order to provide access to their
extra properties (as intended by perl-workflow#54).
…ds as public
By reclassifying these methods as public, they become available for
consumers of Workflow. This makes sense once the action instances
become accessible by callers in order to provide access to their
extra properties (as intended by perl-workflow#54).
Ok. So, while the public API doesn't direcly allow querying optional vs required fields (and if it doesn't, then why have these private methods???), but: the Workflow instance allows querying the set of 'current' (=allowable) actions (get_current_actions([$group])); once the current actions are available (by name), the fields for that action can be queried using the workflow instance by calling get_action_fields( $action ).
So maybe this issue is already catered for. Having an example that uses the fields in the docs would definitely be great to help newcomers understand the intent and capabilities of the library.
Issue Template
Description
In #54, there is a plea to provide access to the action instances for the current state of a workflow in order to be able to access extra properties.
Once access to actions has been established, it makes sense to promote the methods
fields()
,optional_fields()
andrequired_fields()
from private to public: using the same reasoning as used in #54, these methods provide information a UI or other consumer of the workflow could use for user interaction.Bugs and Issues
Specify what version was used
1.49
The text was updated successfully, but these errors were encountered: