AnsweredAssumed Answered

How to model jsf form properties as process variables

Question asked by sherlock on Jan 17, 2013
Latest reply on Jan 26, 2013 by ronald.van.kuijk
We are buildig a workflow using Activiti, JSF/PrimeFaces and JEE/CDI.
Our JSF form has about 40 form fields and each field can have different view permissions like (readable,disabled,editable,hidden)
based on privileges of the approver. There are around 5 levels of approvers so we have created 5 user tasks in sequence
but the name of the approvers can only be decided at runtime based on the selection done by previous approver. So
a previous approver has a choice to select next approver based on list available in the drop down, or he can assign it to
a valid group of next level and someone from that group can claim the task.

We are looking for the best practice to model such workflow, here are our initial thoughts.

1) All the 40 fields will be modelled as XML schema elements with appropriate permissions as attributes.
2) The initial submission of form fields will trigger the workflow as well as generate the XML having elements populated.
3) the XML will propagate from one user task to another and in between its contents (elements/attributes) will get modified based on current approver inputs and also based on next approver privileges.
4) The screen will be rendered to the approvers based on the XML contents.

Now we have following questions for each steps above.

Step 1) Can we have a backing bean with all 40 fields and their attributes and propagate that bean instead of XML. If yes than  what should be scope of that bean and does it needs to be converted to process variables ??

Step 2) If we go with XML approach then how will XML exist in the process engine, as a process variable or any other form ?
Step 3) Do we achieve this using XSL transformation inside a service task or maybe XML modification within JSF objects itself ?
Step 4) Whats the best approach to render JSF/PrimeFaces page using this XML ?