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 very 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.
Key workflow element
As you can see above we can put also 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 very useful feature.
Next element which is crucial are actions. They are blocks which are used to do all possible operation. And in general actions names are self describing.
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.
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.
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.