There are lots to learn about K2 Appit, and this post provides many useful tips, techniques and thoughts that are the result of creating a K2 Appit application that will be used by our HR.
Changing your mind
When designing a business solution in SharePoint, you often change things during the development process. In my experience, changes to lists happen quite often – add a column here, delete one there, update another one and so on.
K2 Automated Testing Software
BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
K2 Appit actually provides an elegant solution to the problem of resyncing list definitions with list data access K2 SmartObjects. Every time the K2 Application page loads, it analyses the state of the lists’ SmartObjects. If any changes are detected, it allows the automatic regeneration of the SmartObjects. It also allows the automatic regeneration of default SmartForms and SmartForms’ Views, but be careful not to overwrite any existing SmartForm customisations.
Complex logical expressions
The “If” K2 Appit logical inline functions must be one of the most powerful ones. The function allows the creation of if/else expressions. Further more, expressions can be nested, thus the output of one expression can be the input of a next one. This is a great way to ensure if/else logic are hidden away from K2 Appit process maps. What a great feature. It is also available in K2 for SharePoint, K2 blackpoint and K2 blackpearl
Copy and paste Workflow Steps in K2 Appit
Right clicking on a K2 Appit workflow step does not provide a copy and paste function. There is an excellent solution in the form of favourites panel. This can effectively be a multi-item clipboard for copied steps. To copy a workflow step to favourites, simply drag it onto the ribbon. K2 Appit automatically saves it.
To use the step, simple drag it back to the canvas.
Quick add Data Fields
Appit Data fields can be added straight from the K2 context browser. This is convenient when a workflow step is configured and you only discover at that point that a data field is required. Instead of exiting the wizard, simply right click on the data fields node in the Appit context browser and click on Add Data Field.
The alternative place to add K2 Appit data fields is from the File menu. This can’t be done while a workflow step is being configured.
Use expression outputs (not data fields) as input for updates
The more I use expressions, the more I appreciate the power of the K2 Appit (and K2 blackpearl) product. One example is using them to calculate values just-in-time before updates without using temporary data fields to save calculation steps’ values. The fact that you can chain expressions together is great engineering from the K2 product development team, and its usage hides complexity in workflows and promotes simplicity.
In the example below, the output of an nested expression is mapped to the input of the property that needs to be updated. What a great feature to be aware of, and how to apply it to promote K2 Appit best practices.
Full process instance visibility using K2 Appit View Flow
The K2 View Flow feature not only looks great, but is provide users real time insight into running process instances. Why this is mentioned in a post that is about K2 Appit development? The simple answer is that the process map design is important to assist process instance visibility. Process definitions that are to complex and cluttered loose their visibility, and time should be spent to ensure the design avoids this.
Avoid using the K2 process map to evaluate logical expressions. Use the inline function’s logical expressions to do this.
Ensure the K2 Appit workflow steps are named appropriately for the task they are fulfilling. Try and avoid names that are technical if at all possible.
If a process becomes too complex, use sub-processes to keep the high level business process’s visibility clear. The image below shows where this feature can be found.