This is the second part of my “SharePoint designer workflow” blog post series. The first one you can read here. Today you will read how we can design workflow itself. In general, idea of workflow building is quite simple. You will add stages to which will be run by the process after event will occur. We have three events which can trigger our workflow:

  • manually started
  • when an item is created
  • when an item is changed

Every stage when is finished can move to the next one; it can come back to previous or it could finish the flow. We make this decision in the field “transition to the stage”. You can see those options below.

transition to stage
transition to stage

Key workflow element

As you can see above, we can also put conditions to our transition stage. It allows as yo make decision about which step will be run next. We can use such approach to emulate state workflow. It wasn’t possible in previous version of SharePoint. In some situation it’s particularly useful feature.

Next element which is crucial are actions. They are blocks which are used to do all operation. And in general actions names are self-describing.

Worfklow actions
Worfklow actions

Another important part is condition operation. We can use them to check different condition which can exist or verify some information which are provided by the user. For example we can check if someone is valid SharePoint user. Imagine that you have text field which will be used to collect information about users. But we can’t be sure that information are valid, and if we use wrong data workflow will get an error and will be broken. With such condition we will just check it and if the data is wrong we can make something different.

workflow condition
workflow condition

The last piece are loops. We use them to check if any expected event occurred. Or in different option we can run a loop n times. And here’s one important information in terms of SharePoint online. If you will create workflow which contains many loops “Loop with Condition” it could happen that your process will be suspended by the engine. In logs you will find information that you exceed your resources throttle (more here ). In general it’s Microsoft protection to protect their servers. If you have such Problem you have to rebuild your process and use different actions. For example you can stop the process for some amount of time and then use condition action.

workflow loop
workflow loop

And that’s all at this moment in next part I will show you have to build real process which will utilize all key elements which I was talking about.