Sharepoint List Binding with K2 Workflow & Smartforms

Today we shall see how we can bind a K2 workflow with a Sharepoint List and trigger the workflow when an item gets added to the list. Also we shall see how we can use K2 smartforms for adding & updating an items in SharePoint list.

In previous post I have shown how to enable K2 for a list using K2 Five for Sharepoint tool and the options for generating the Smartobjects, Smartforms, workflows & Reports for the list. Now we look at the other way to achieve the same.  I’ll be using the Same Users SharePoint list which I have shown in previous post

Click on K2 tab and select application which will open the page as shown below

As we have selected only Smartobjects generation in previous post, it is just showing them. Now Click on New tab and Select Generate Forms which will show you below screen.

Now click OK and the tool will generate view and forms for you based on the list columns and once it completes it will show you below screen with all the views and forms that are automatically created.

It will create 3 forms one for adding a new item, one for editing and one for display purpose. We can directly edit the form or view from here if you want to change anything like look and feel or controls. Also you can edit these forms from the K2 Designer which I have shown in my previous post.

Click on Settings to see or change the forms to show.

Now navigate to Users List and click on new to see the K2 Form which is highlighted in below screen.

Now let’s create a new workflow and associate with this list, so that whenever a new user is added to this list it will create an approval task to some user and updates the status accordingly.

Now from the Users List K2 Application screen, click on New and select workflow.

Now it will show you below screen where you find 2 options to trigger the workflow. One is via Smart form submit button and the second way is via Sharepoint list item events that are available and shown there.

Here I’ll select “When the following events occur” and select “An item was added” and select OK which will open K2 workflow Designer. Now design your workflow with your requirements.

In Users List I have added a new column called Status and initially when a new User is added to the list, the status will be Pending Approval and once the task is assigned to Manager and he performs as an action then accordingly the status will be updated and workflow will complete.

Below is the screen shot of workflow that is created for this purpose. I’ll create a separate post explaining the process of creating a workflow in new designer with all the events that we have now.

Now Create a New User in List and see the Workflow is getting Triggered status will be set as Pending Approval

And task is getting assigned in TaskList (You can access Tasklist from K2 Tab in Users List.)

Approve the task and see the status getting changed.

That’s it. This is how we can make use of K2 Smartforms and Workflows along with Sharepoint list.

Thanks for reading!!

Advertisements

Moving to K2 Five? – Things to know as a Developer 

Hello Friends, It’s been a long time since I have posted a new update in my blog as I couldn’t get time due to a big leap in my career and was busy trying to learn too many new things.

Now that I got a chance to work on K2 5, I would like to share the things and major changes that I have found while moving from K2 4.7 to K2 5 which would definitely help you guys who are planning to start their work in K2 5. Below are the things that I can highlight and we shall go through them in details one by one.

  1. No Visual Studio, No K2 Studio. Both of these workflow development tools have been removed in K2 5. Now we have a fresh and revamped New K2 Designer which is completely changed and gives a great UI experience which we have to use for developing everything in K2 i.e. Workflows, Smartobjects, Smartforms.

New K2 Designer

It will show the most recent files that you have accessed along with folders.

Also you have links to K2 tutorials for learning these new things.

K2 Five Designer New Look

Sneak Peek of New Workflow Designer

Workflow Designer Sneak Peek

In my next post I’ll explain with a sample process to create a new workflow, smartform, Smartobject in detail covering all the options and the changes in the naming conventions and more.

  • Workflows that are migrated from 4.7 to K2 Five can still use Visual Studio to modify the workflows but if we you want use new designer for old workflow then you have to recreate them.
  • We have new Workspace with complete new UI and most of the features getting changed.

Here we do see a complete new look as shown below

Inbox will have all K2 Task Mails that you receive as part of Task Notifications once open the task it will load the related form or if no form is configured for that task then it will open default basic task form as shown below.

Along with this new Inbox Feature we still have our old Process Overview Reports where we can see the activity instance data of all process instances along with Audit data of data fields.

All process details are listed below click on the link to go to the particular process instances. All similar to old process overview but just the new look. Below is the screen shot of a particular Process instance details. You just need click on instance to see the details.

  • Along with this we have the same K2 Management site which got introduced in 4.7 getting used here too.  Screen Shot below

As you may already aware that this Management Site can be used to manage all admin kind of activities like

  • Managing permissions
  • Providing access rights
  • Export rights
  • Role Management
  • Testing Smartobjects
  • Error Logs
  • Out of office configurations and many more.

I’ll create a detailed post about this in coming days.

  • Package and Deployment tool is still the same as old tool.

That’s it for this post. I’ll create separate posts in detail for all the topics that I’ve mentioned above and publish here soon.

Thanks for Reading!!