Skip to main content

I have the requirement to create a K2 smartforms-based workflow and forms but without the use of states. This is to ensure other apps used for management and reporting can still interact with the system. I've managed to get it working, but I would like to know if there is a better way.


I bound the workflow to the base state throughout all the client events. I created hidden buttons which will load each of the client event worklist items. On my form initialize I check whether there is a SerialNo specified and I then break it up into ProcessID and ActivityInstanceID (using expressions and stored into hidden fields). I then call the List method of the Activity Instance Destination reporting smartobject, passing in the ProcessID and ActInstDestID. This returns the name of the current activity which I save into a hidden data label. Then I have an IF condition for each activity name which will call the Click method of the related hidden button. In these buttons I have configured the Open Worklist action for the particular activity.


This works but is sometimes slow on form initialize. I would appreciate any ideas on how I could do this differently.


Thank you,

Hi Johan,


 


I generally do not use states in my smartforms (just a personal choice and not best practice by any means). As I generally don't use activity datafields, I do not create a distinction between the client events from different activities. I just bind it to the first client event in the list unless there is something distinctly different. It loads OK as in it doesn't enforce that the runtime act name vs design time activity name.


If this doesn't work for you, I would start by printing out time stamps between calls to try and find the bottle necks. Or add the _debug=1 query string.


Reply