Hi Everyone,
I've designed a couple of K2 smartforms integrated into K2 processes.
By default K2 forces you to use states and personally I'm not a great fan of using states. I want to find out if this is my sentiment only or whether there are others feeling the same way.
The problems I have with states are:
- They duplicate the rules of your form
- As soon as states are introduced and rules need to be modified, that modification needs to be redone for each state if it is not the base state.
- Makes designing a "clever" form difficult which can evaluate the current activity of the workflow and then "adapt" to display the relevant information in a view acceptable to the approver.
- They add extra querystring parameters (probably not a big deal)
I have designed forms using only the base state. I then query the ActivityInstanceDestination reporting smartobject on form initialize (parsing the SerialNo as inputs) to determine the current activity of the process instance. I then create hidden buttons for each activity where I place the worklist item load events in. I then have a very bulky (and clunky) if structure which will evaluate the current activity name and then call the OnClick event of the correct hidden button.
I don't particularly like this approach because as soon as an activity name changes or a new one is added, the form will break. Being able to decouple your forms and processes has always been a very attractive K2 blackpearl feature which I feel has been lost with the introduction of K2 smartforms.
I would like to hear others' thoughts on this please and how others have dealt with this.
Thank you,
Johan Liebenberg