Skip to main content

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

I have had the same issues and frustrations with "states" in smartforms.  While the concept of the base state and all states inheriting the rules overall is a good concept that at least allows us to disable them in other states, the main problem I have had is with new changes that affect only certain states.

 

I have some states that use Create methods on smartobjects and in other states, they must use the update method on the SO. 

 

Ideally what I would like to see is a copy/clone button for states, so if you had several custom rules for a non-base state you could copy that and modify as necessary versus having to create all the rules manually.  Maybe there is a way to do this with SQL queries or a function? 

 

Thanks

Steve


Reply