Archive for the 'K2 Studio' Category

IT in 2010… is it going to be as we predicted it?

With the new year almost upon us, I’ve been trying to theorise what skills will be required of developers in the next four years.

It is important to take stock of what you’ve got at the end of each year to ensure you offer training and support to the development team to help ensure they are productive with new technologies and tools.

As a developer myself, do I need to worry about keeping my job… ?

Ellen Fanning from Computer World, back in 2006, predicted outsourcing and the need to be business savvy was a major threat to IT workers.

John Newton from the CIO weblog (also from his own blog), back in 2007, predicted that content management would be improved and delivered in more human friendly ways. Business computing would shift to Blackberry type devices. User Interface design would be improved and take ideas from the gaming market.

There are a number of existing/emerging technologies that will impact my organisation in the near future (… I’m well aware that we are behind the curve on most of these, but give us a chance, and we’ll try to keep up :-)). Those are

  1. SharePoint 2010
  2. .NET 4.0
  3. ASP.NET Model View Controller 2
  4. jQuery
  5. Silverlight
  6. Windows Presentation Foundation

I’m sure there are many others.

We’ll also be trying to maximise productivity with our existing tools, such as the K2 BlackPearl / BlackPoint workflow suites.

It is has been a difficult time for many IT workers, when a business looks at what it can cut out of the budget, it usually means laying off staff, or the reduction of investment in their IT systems. Hopefully we can take heed with an article from Judi Hasson, Fiece CIO, who writes that IT is the key to recession recovery. Lets hope so!

Merry Christmas and a happy new year to all :-D

SC



K2 [BlackPoint] - A simple meeting agenda review process in InfoPath… that can even store the completed InfoPath form

Well, I say simple… It is simple to me, as I’ve knocked it up using the Meeting Agenda template (free with InfoPath 2007) with a slight addition of a task action field, and I’ve then knocked together a simple approval and rework based workflow.

k2blackpointdemoprocess_001 
Figure 1: The finished workflow (I’m not going to teach you guys how to suck eggs by going through the creation of it… unless you’d like me too … another time perhaps?)

Figure 1 shows the finished article… I’m not suggesting that this is perfect example of an approval and rework workflow…  it is simply here to demonstrate a point.

k2blackpointdemoprocess_002
Figure 2: Destination Form Library for the creation of the InfoPath form that starts the workflow

I’m using a standard MOSS 2007 form library to store my InfoPath forms as shown in Figure 2. When ‘New’ is clicked, you see Figure 3.

k2blackpointdemoprocess_003
Figure 3: The InfoPath form created when ‘New’ is clicked in Form Library (FormLibrary001)

k2blackpointdemoprocess_004  
Figure 4: The K2 Worklist (which just happens to be in the Process Portal (K2 Management)) showing the new task for destination user ‘Administrator’

As you can see in Figure 4, a task is added to the administrator user task list.

k2blackpointdemoprocess_005 
Figure 5: Clicking on Open will take the user back into InfoPath, or the Actions option will allow the user to action the task bypassing InfoPath - this might be useful if you want people to bulk action things. In this example I should really disallow this option. You can do this as part of the InfoPath client event outcomes.

k2blackpointdemoprocess_006
Figure 6: Shows the opening of the InfoPath form from the K2 BlackPoint runtime services… I’ve configured this on port 8080 (just so you know). This gives me a clue that unlike K2 BlackPearl, InfoPath forms only exist in K2 Server, and not in the form library… which confused me somewhat… or perhaps I’ve got the wrong end of the stick on that.

k2blackpointdemoprocess_007 
Figure 7:  User is able to select an outcome from the task action field as you’d expect

k2blackpointdemoprocess_008
Figure 8: Shows the final resting place of the InfoPath form - this is because of the SharePoint document event I placed in the final activity. I assumed the form would be saved by default, but it doesn’t seem to work that way… but it certainly did in K2 BlackPearl.

So how did I get the InfoPath form to be stored in the Library at the end… well the next screen shots and explanations will tell you how! I must admit, I thought it would do this automatically, but both the Beta 2 and RC versions of K2 [BlackPoint] behave in this way…

As you may have noticed in Figure 1, I added a SharePoint document event to the end of my workflow. This is also shown in Figure 9.

k2blackpointdemoprocess_009
Figure 9: Shows the SharePoint document event on the final activity that saves the InfoPath form. I’m using the Upload Document Event Action.

k2blackpointdemoprocess_010
Figure 10: Shows that I’m going to be creating this uploaded file from a K2 Field. This is very important, as K2 BlackPoint is now being told that the file stream is not from a disk, but from the database

k2blackpointdemoprocess_011
Figure 11: When selecting the K2 Field, be sure to select the Root node of your InfoPath form. The Root node will be the name of your Template (in most cases). My Template XSN was called MeetingAgenda001.xsn before it was integrated into the workflow.

k2blackpointdemoprocess_012
Figure 12: I am building the Filename of the output file using the meetingTitle field from my InfoPath template

k2blackpointdemoprocess_013
Figure 13: To ensure an unique filename, I utilise the Process Instance ID

k2blackpointdemoprocess_014
Figure 14: Be sure to space out your dynamic fields, I’ve used a hyphen. Also be sure to add the extension to the end. For InfoPath, the extension required is ‘.xml’ (well, of course it is!)… You then end up with files named like they are shown in Figure 8

Of course, you may not have to do all this stuff… I might have an incorrectly set-up version of K2 [BlackPoint], but thinking about it, it does make sense to me.

  1. InfoPath forms are ‘protected’ from unauthorised modification as they are stored in the database
  2. InfoPath forms are only stored in the library when they are in a complete state (because you decided when they would be stored!)

This is definitely an improvement on how BlackPearl handles them, as they are editable (through other means… e.g. text editor) when they are mid workflow, and it was a concern of the customer.

Anyways, I hope this helps others understand how to do this sort of thing. Post a comment if you want more explanation on anything, but of course, check out K2 Underground first!

SpittingCAML



K2 [blackpoint] - the early verdict

Well, what can I say. I’m very impressed! It feels much cleaner, and much more stable than K2 [blackpearl]… perhaps underlying the inadequacies in the Visual Studio 2005 plugins, and the brilliance of the new Microsoft Office 2007 Style K2 Studio (Shown in Figure 1 below).

blackpoint_nicetutorial
Figure 1: K2 Studio, new with K2 [blackpoint]

As you can see, there are a number of ’steps’ along the top which take you through setting up your MOSS 2007 or WSS 3 portal correctly. It is much more simple this way, and ensures you activate the K2 features and webparts correctly.

Clicking on the ‘K2′ logo in the top left, much like in Office 2007 brings up a familiar ‘new’ dialogue where you can start to create a new  project/K2 process (Shown in Figure 2).

blackpoint_niceprojectcreation
Figure 2: New project dialogue

Creating your workflow is as easy as in K2 [blackpearl], and you draw the lines between each process using right mouse button, dragging a line between the items you wish to join. There are familiar options, in fact all the options you would get in K2 [blackpearl], without the option of viewing code or editing the WF objects. I created a simple workflow that sends an email when a new contact is added to the portal site (Shown below in Figure 3)

 blackpoint_workflowdevelopmentpanel
Figure 3: Example workflow

I then deployed the project using the big ‘deploy’ button shown in Figure 3, and it deployed successfully after asking which server I wish to deploy to (Development, Staging or Live etc.) and what to call the version that I am deploying, pretty straight forward, it does all that in K2 [blackpearl]. You then need to create the site that will be hosting your workflow data. Its pretty easy, and you are taken through what to do in easy step by step instructions. Once you’ve created that, you should have a SharePoint web site looking like Figure 4.

blackpoint_workflowsite0
Figure 4: Deployed Workflow SharePoint site 

This is something new, and I really like this idea, as it takes away the having to learn the K2 Workspace supplied with K2 [blackpearl] and gives you the courage to delegate workflow administration to your power users/business analysts.

Okay, enough of that… lets start the workflow by creating a couple of contacts - which should generate two instances of my workflow, and send an email to me.

 blackpoint_contactlist
Figure 5: Two contacts created, with an added ‘workflow column’ that shows a status 

Due to my workflow integrating with the contacts list, K2 [blackpoint] added a nice column to tell me the status of it. This changed from ‘In Progress’ to ‘Completed’… and no email arrived… I wonder what went wrong then?

I returned to the Workflow web site, and clicked to see the instances I just created. The excellent view flow feature from K2 [blackpearl] is available. It shows me that the error is in the email sending section (Figure 6).

blackpoint_viewflow
Figure 6: The view flow, from the workflow web site

I investigated, and used the Management Console that is available in the SharePoint administration site. This is yet another feature that has been integrated (shown in Figure 7). Excellent :-). No errors here, so I checked the event log on the machine. It would seem the runtime services hadn’t been installed correctly. The application pool had an invalid identity, so I fixed that, and tried again.

 blackpoint_managementconsole
Figure 7: Management Console integrated into SharePoint administration

I went back into the Workflow web site and clicked ‘retry’ on the instances that failed… sure enough, email arrived as expected! (shown in Figure 8) I cancelled a few that I had created trying to diagnose the faults, using the ‘cancel’ option.

 blackpoint_itworked
Figure 8 - the email arrives 

Brilliant, my workflow appeared to work. Looking around at what I can do, I think the export to excel reports are really cool. (shown in Figure 9)

blackpoint_nicereports
Figure 9: Excel reports 

Interesting, however, is it correct? I cancelled two, but where are the ones that completed? Do I need to have a terminate event on my workflow? I’ll do a little more playing around. If you know, please comment on this blog post.

I think this could be a very useful tool for our organisation, and best of all, the training required is greatly reduced since it’s all SharePoint based now, and our staff already know SharePoint.

SpittingCAML




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.