Item10005: Implement AJAX-y workflow transitions
Current State: Needs Developer
Released In: n/a
Target Release: n/a
When building dashboard views, it's often very useful for users to act on the underlying topics directly, without time-consuming page loads.
It would be much easier to build user-friendly, powerful workflow dashboards if
could optionally work via AJAX calls, transitioning workflow-controlled topics in place.
Suggestions (in rough order of simplest/least functional to more complex/complete):
- Implement an optional
redirectto parameter for
WORKFLOWTRANSITION (default value:
BASETOPIC), to control where users are directed after the transition is complete. Ideally this would preserve url parameters, so dashboards could get hints as to what happened (e.g., if you wanted to add some text above a table of topics that said something about what happened).
If the transition requires additional edits (e.g., a form was added with mandatory fields), the user should be redirected to the value of
redirectto once that's complete. Consider this the no-js fallback.
- Implement an optional
method parameter for
WORKFLOWTRANSITION, to control how the transition is enacted, which would accept the following values:
post [default]: preforms a normal form post, navigating the browser away from the current page.
ajax: generate a jQuery.ajax() call to perform the transition, so that the browser doesn't navigate away. After processing, some simple, default success/error callbacks should handle updating the transition form (effectively rendering the
WORKFLOWTRANISTION macro again), so that the dashboard is updated to reflect the currently available transitions (or lack thereof).
Again, if edits are required, then the browser should navigate to the the edit script, and come back to the original topic (dashboard) when complete. The documentation should be clear on what happens to custom callbacks in these cases, so wiki app developers don't paint themselves into any corners if they were depending on more ajax calls to fire off.
- Implement some method of passing settings to the jQuery.ajax() call. This would be particularly useful for defining custom success/error callbacks when building dynamic interfaces. The default
success callback should take care of the
WORKFLOWTRANISTION form, but more complex dashboards might have lots of things that should be updated to keep things in sync.
For example, if a user changes the state of one topic in a table of workflow-controlled topics, a callback could be used to change the styling, animate, or completely remove that result from the table, as appropriate.
Possible implementation ideas could be:
- a single
- individual parameters for common options (e.g.,
- 11 Nov 2010
Renamed and edited the feature proposal, as WorkflowPlugin
already handles topic targets for the
- 18 Nov 2010
All very reasonable. However requires a developer.
- 24 Nov 2017 - 10:23