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,