New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Workflow: support for "stage" #2256
Comments
Looking forward to this. Keep it up |
@Kevinhebertd We are working on it :) |
We have done quite a bit of progress on the UI. Remaining steps:
|
Do you have an updated release date for 4.11 ?? 😃 |
It's not going to be in 2015, that's for sure. Shooting for sometime Q1 2016. |
UPDATE: We have progressed on this until the end of 2015, but then decided that 2016.1 (AKA 4.11) would focus instead a number of features and fixes for customers. For 2016.2, we have decided to focus on one Form Builder usability feature. Still, there was some work done:
When we pick this up, we should focus on addressing #2762 first. |
Possible next steps:
|
|
Consider the case of an expense report, and say that after an employee submits an expense report, the employee can update it, but not approve it, and a manager can approve it (or reject it), but not update it. When a persistence API implementation gets a PUT, it doesn't have enough information to discriminate between an update of the initial expense report (only allowed if done by the employee) and an approval or rejection (only allowed if done by the manager). It doesn't have enough information to properly enforce the permissions. It could reject operations that are clearly forbidden, like a POST by someone other than the employee or the manager. And this is something we could do in the future, but it has two downsides:
(It should be noted that this second point is already a problem right now: a form can implement the above scenario by hiding controls or making them readonly based on the user's role, and persistence API implementation doesn't check that.) |
Summary of how do we handle the workflow UI so far:
The idea is that:
In practice, our XForms implementation requires XPath expressions pointing to XML. That is why we do this Scala ↔ XML translation. See also #3455 for similar considerations on how we could improve that. |
I think we can continue along these lines for now. Steps:
|
Next steps:
|
Supporting native instances would be good, see #3455. |
For reading/writing from/to the form definition: Converting (option in the Form Builder permissions and/or Workflow dialogs?):
Running:
|
Following discussion with @avernet today, we suggest, for the stage name, to have a localizable label. This is usual for:
|
Related issues
Use case
In a small business, anyone with the role
employee
can submit an expense report by filling out a form. After it has been submitted, the employee who created the expense report can can see but not edit the data (but other employees can't see the data), and anyone with the rolemanager
can either approve or reject it.New concept: stage
Overview
started
,submitted
,approved
,rejected
, withstarted
marked as the initial stage.approved
and the reject button will change the state torejected
.In Form Builder
Stages
Out of the box, we'll have 2 stages:
started
(the default), andsubmitted
. Oursubmit
process will change the workflow stage tosubmitted
, which will allow us to make a distinction in the database between form data that has been just saved, but hasn't been submitted yet, and data that has been submitted.Available to
The Available to section shows in the Operations tab of the Workflow dialog. Its purpose is to allow form authors to whom a given operation is available, e.g. based on the user's authentication role or the workflow stage.
Pre-defined operations
Custom operations
Implementation
metadata.xml
. For the REST API, the stage is sent off-band through headers, as done currently for say, roles and operations.WHERE
clause.change-stage('approved')
.fr:stage()
- A new XPath function is added that returns the current stage, so the stage can be used in MIPS and in processes where XPath expressions are used./edit
and has only the right to view, then she is redirect to/view
.The text was updated successfully, but these errors were encountered: