Social media


Tuesday, January 7, 2014

SharePoint reminders. Don't forget, always remember! Part 2

In the first part of our guide we discussed alternatives to Datapolis Workbox: alerts, SharePoint Designer, Visual Studio, and Nintex Workflow. Today we will take a closer look at our solution and show how it can do much more than simply setting up a reminder.

Datapolis Workbox is a graphical designer for state machine workflows in SharePoint. What does “state machine” mean? To keep it simple it will help us support advanced scenarios, much more complex than the one we described.

In Datapolis Workbox every state of a workflow has a name which is shown in a special column. We do not have to create custom status column as in the previous examples, because it will be created automatically. So what states do we need? Of course one: “Assigned” (and maybe some more for more complicated scenarios, but we will get back to it later). Let’s build our simple scenario:

An assignment workflow created in Datapolis Workbox

We have now one state – Assigned, and two actions – Remind and Start work on issue. What are those actions? They are transitions from one state to another, which can be invoked manually or automatically. Actions can include some activities like sending an e-mail etc. When a new item is added our workflow starts automatically and goes to the Assigned state. In SharePoint it looks like this:

Datapolis Workbox actions visible in the SharePoint list

A user can just click Start work on issue to move the workflow to the next state (which in this case is the end state). That move includes, like I mentioned above, some activities that will, for example, send an e-mail or update item (or do lots of other things).

But wait – what with our reminders? We just need to set them up. We will use Remind action which is a loop action that allows to go back to the same state. In Datapolis Workbox we can set up something called Self-timer. That mechanism  provides possibility to launch an action automatically after (or at) selected time or if chosen conditions are met. Its configuration is very simple – you just click on an action, then on Self-timers button and then just click “Add new self-timer”. The window below will pop up.

Self-timers window in Datapolis Workbox

The edited action will contain an activity (see the picture below) that checks if due date is passed. If so, it sends an e-mail to Author or, if not,  it sends an e-mail to Assigned person.

Send an e-mail activity in Datapolis Workbox

So how does the process work now? It checks daily if due date is passed and then sends an e-mail – to Author or to Assigned person. If an item is not assigned it does not send an e-mail at all. So we can celebrate – we have accomplished our scenario.

But if it is the same as before why did we do it? Is there a reason? Yes - we can now stop waiting and move our workflow further, so that it can support the whole process. This workflow does not perform only one waiting activity. It waits for several things at the same time – for the self-timer which launches “Remind” action or for a user who launches “Start work on issue” action. And it is not all. For example we can move workflow to other state automatically if due date is passed, send reminders to the author in the other state and, if the author changes something or requests additional work, we can go back to the earlier state and send reminders to the assigned person again. In more complex, real-life situation that workflow can look like below:

A sample workflow created in Datapolis Workbox

The workflow contains the whole process that supports assigning, working and checking of an issue. It can request additional work (Assigned person) and more information (Author). It also supports several ways of sending reminders to Assigned person or Author (when due date is passed or when there is a request for additional info). Moreover, as you can see (look at blue clock icons on actions which symbolize self-timer) the workflow automatically moves to “Due date passed” state if due date passes (self-timer set to the date loaded from Current Item).

You have to remember that in real life you will also need to create some roles in a process. It is rather hard to support it dynamically in SharePoint, but in Datapolis Workbox you can just add roles using the graphic designer, include them in special activities and use in actions, so only those entitled to see some actions will see ones.

Summarizing, we have accomplished our scenario. It took us the similar amount of time than in Nintex. The advantage is that in the next several tens of minutes we made a really complex solution that would take days or even weeks in code.

Simple answer?
So is there a simple answer which tool we should use? As you probably already guessed – of course not. It always depends on what do you need. Let’s summarize our research and take a look at tools we’ve used:
  •          Browser – you can set up alerts through it. Enough for very simple scenarios when you would like to see changes on a list or a library.
  •          SharePoint Designer – more effective, but support only simple sequential workflows, without repeating of reminders.
  •        Visual Studio – fulfills every scenario. And your time as well. Use it when you need a deeply customized coded solution.
  •         Nintex Workflow – supports easy creation of advanced reminders as well as development of sequential workflows.
  •           Datapolis Workbox – allows to create multiple reminders inside complex state machine workflows.

It is really easy to choose a wrong tool, so you should always think and analyze before. Maybe your needs can be changed? Maybe you do not need something complicated? Maybe you can discuss how you should really remind people about their assignments? Or perhaps you could create your solution partially by a 3rd party workflow tool and partially by coding? Remember that a good tool can save you much time, but knowing how you want to achieve a solution and choosing the right tool, even not the best on the market but the best for the current project, can not only give you spare hours, but really drive you to success.

Tomasz Głogosz is Datapolis Workbox project manager and senior .NET architect.

No comments:

Post a Comment