Friday, May 25, 2007

My blog is moved... to ... http://srikantha.wordpress.com

FEED is here: http://srikantha.wordpress.com/feed

Tuesday, May 22, 2007

Task Delegation

K2 provides delegation features out of the box. Every manager in the directory has access to their subordinates' tasks. As a user you can redirect your worklist items to anyone in the directory as well.

there is also a nice out of office component that allows users to setup out of office scenarios as well.

When you want a group of users to have exclusive access to business process tasks so that they can manage them, you either make this group of users as a destination in those tasks of interest and leverage the K2's out of the box task management features OR will need to use K2 APIs to implement this functionality.

K2MNG is the management API that can be used by anyone who has K2 Admin permissions. this API allows you to implement custom interfaces that can provide functionality (or a sub set) that is found in the K2 service manager tool.

let's look at the code required to set this up.

1. you connect to K2 via the management API as a k2 admin (only K2 admins can use this API) -> K2Manager.login(...)

2. you get the worklist items for process instances you are interested in. This will bring in any currently running processes'
worklistitems from the criteria you have passed in. look at the help for detailed info on this method and other parameters. there is also a sample in the K2 help file. -> K2Manager.Getworklistitems(...)

3. you then redirect any interested worklistitems to anyone required.

5. you disconnect -> K2Manager.logout()


Try

Dim kmgr As New SourceCode.K2Mng.K2Manager

'I must be a K2 Admin

kmgr.Login("localhost", 5252)

Dim wl As SourceCode.K2Mng.WorkListItems = kmgr.GetWorkListItems( Nothing,
"project\processname")


'redirect this wlitem to admin

'you need to find and select which one/ones you want to redirect

kmgr.RedirectWorklistItem(wl.Item(0).ID, "Administrator")

kmgr.Logout() 'remember to logout

Catch excep As Exception 'catch any exception

' Exception Occurred :)

End Try

Friday, May 18, 2007

Dynamic Escalations

I came across a query on how to make escalation configurations to be dynamic in K2.

The user wanted escalations to be reset when a process datafield is changed. He wanted to do this in a client event so that the user interface will have update and submit buttons and as the user make changes to the fields and update the form, the relevant escalations should be reset accordingly. If the user does not do this within the escalation period ofcourse the escalation should fire. If the user makes the update, escalation resets and now we expect the next update to happen and the next update and eventually user will submit and complete the event. then the process moves to the next activity.

Interesting functionality! however doing this in K2 is not straightforward.

K2's escalations are bound to an activity at the time of the creation of the activity instance. so the escalation timer value cannot be altered afterwards - during runtime.

This means that the way to reset an escalation configuration, is to expire the activity and reinstate that.

Okay but how do we achieve what the user wanted?

If you create an activity with a single client event and configure the escalation in that activity, then you can create another activity with a server event, immediately following the previous escalation activity, we can write code in a server event that can look at what needs to happen based on the updates made in the previous client event, and setup some datafields with appropriate escalation timer values. We then loop back into the escalation activity (when required) and use these datafields to reconfigure the escalation.

the process map will look something like this:



You will also need to create some process data fields - make them hidden and not audited.

In the user interface that corresponds to the client event, we can put in some code that will redirect the page to the user's next worklistitem from the same process instance and they will see the same page now with the updated values but belonging to another client event.

the code for this will look like this:

con.Open("k2server");

WorklistCriteria crit = new WorklistCriteria();

crit.AddFilterField(WCField.ProcessFolio, WCCompare.Equal, “folio_of_my_process_instance”);

crit.AddFilterField(WCField.ProcessFullName, WCCompare.Equal, “project\\processname”);

crit.AddFilterField(WCField.ActivityName, WCCompare.Equal, “activity_name”);

crit.AddFilterField(WCField.EventName, WCCompare.Equal, “event_name”);


Worklist wl = con.OpenWorklist(crit);


if (wl.Count > 0)

{
url = wl[0].Data;
}

Con.close();

Page.Redirect(url);


of course the server event in the activity that follows the escalation activity will have to work out the relevant logic to set the correct escalation timers and line rules. but, we have done it :)

Monday, May 14, 2007

The Essence of Escalations

what a lovely morning ...you are busily working through your tasklist. before that 10 am meeting you need to finish these last 3 items... and you hit a snag!

You need help. You need it now. Usually it is not that easy...

But, you can get help and get it formally if you have had escalations in place.

Escalation is a management tool. it helps the managers to help employees get things done.
Escalation support also helps to avoid things that could slip through the cracks.

Escalation mechanisms are handy when you are dealing with business processes.

Business processes typically have a lot of activities and tasks. Many different groups of people will be involved in executing tasks and there could be delegations, re-assignments, re-prioritising, suspension and cancellations of tasks. All these actions could affect future activities in the same or connected business process instances.

So it is very important to have escalations in place in your business processes so that if u hit a snag you are covered for it. if u forget something, someone will remind you, repeatedly.

It is your insurance policy that proactivley works to reduce process accidents :)

By defining ecalations at various levels of your business process, (activity, task, group and user) you can have fine grained support and control.

K2.NET 2003 shipped activity level escalations out-of-the-box. Blackpearl comes with event/task level escalations. Blackpearl implements the escalation mechanisms for you on top of the WF framework. Your WF artifacts can also be 'escalation enabled' if hosted inside a blackpearl event. Cool, huh?

Friday, May 11, 2007

more on Dynamic Business Applications (DBAs)

So Dynamic Business Applications (DBAs) are cool. But, how do we build them? What should we look for when designing them?How are they different to OO design?are they different?

Actually Objects are still at the core of apps. Any app. In DBAs we orchestrate objects, composite objects from other object systems. So that our app building process is rapid. since the plumbing is done for us we are doing less work and leveraging more from whats already there.

the focus is on the process - what do we do with these objects.

by declaratively assembling objects and configuring rules and policies these objects will abide by we are raidly working at the business domain. we dont have to get lost in translation back and forth between the tech and biz domains. thats the power of DBA platforms.

having the ability to visually design these composites is important. business user tooling to work with these applications is essential for a DBA platform. You could say the 4GLs are back with vengence. I think blackpearl is a better one. time will tell.

Thursday, May 10, 2007

Dynamic Business Applications

Changes are so dynamic in this world, in our environment and in business. They say "Change is the only constant". I say "Change is a dynamic constant".

We the human race, race to control this change to our convenience constantly. that is our heritage. building business applications in this tradition is a natural transiton that has been the trend in IT with different degrees of success.

Looking at bits of data as information and mining it to extract powerful knowledge has been the domain of specialised apps. now that power is coming to the hands of every information worker. the specialised tools are becoming platforms on top of which familiar interfaces are building feature sets to enable managers and receptionists to impact and control change in the business.
it is impressive.

K2's upcoming release 'blackpearl' is aimed at making business applications more dynamic. process centric approach makes sense in the business world. you dont spit bits that go into a blackhole. they are transactions certainly costing you something so you need to know about it and you need to leverage it. why send an email to discuss a meeting plan? use calendar or the meeting workspace. use search. leverage the integration into document management. look at the flow of process and anticipate. learn from automatic documentation. do bulk actions. collaborate and get notified through the appropriate channels....and best of all control all these and adjust them dynamically. build more dynamic apps easily.

Monday, May 07, 2007

The power of simplicity

When we look at business process automation, in most cases, we are talking about electronic forms automation. That is the human side of BPA.

Most business applications have forms and reports (what more is there from a user perspective? :) If we can get users to build these applications (they know what forms/reports they want) and make it simple and a satisfying experience then we can get IT to focus on the harder aspects - like the architecture, plumbing, hosting, security, backup, system integration, etc, etc.

Recently I have come across two projects involving K2 and AchieveForms. Here's a link to an integration video made available on the net that illustrates the possibility of this kind of app building: http://video.businesswebsoftware.com/AF_K2.wmv

in this video they showcase how you might get a business user to design and implement a forms based business process that involves approvals, etc without coding and IT involvement.

This page is powered by Blogger. Isn't yours?