📜 ⬆️ ⬇️

Workflow in the workflow balloon: standard and not very

Good day, dear habrovchane!

Quite a large number of organizations, state and commercial, if you didn’t set up a Sharepoint, then at least you heard and imagine what you can do with it (thanks to Microsoft marketers).

In this article I want to briefly describe the main ways I know how to create workflows in Sharepoint, and, as an additional topic, how this can be done in one of the application solutions - EOS for Sharepoint. Subject workflow - document management.

Imagine a business process of approving a document, application or other entity, which can be schematically depicted as in Figure 1 (sequential agreement on a linear route) and in turn consider the approaches:
')
1. Use Sharepoint's embedded approval business process (three steps)
2. Process Modeling in Sharepoint Designer
3. Creating a workflow in Visual Studio
4. Creating a workflow in an EOS for Sharepoint solution

Consciously omit here such methods as writing Custom Activities + Sharepoint Designer, creating a workflow designer in Visual Studio, using logic in Infopath forms. The first does not significantly increase the logical flexibility compared to the Sharepoint Designer, the second is difficult to develop, which will be justified except when developing your own boxed solutions. But InfoPath forms are only in the Enterprise version, not everyone has a desire to buy Enterprise.


Figure 1 - Linear matching scheme

Obviously, if an automated business process looks like in Figure 1, then, with some reservations, any method will do - it is only a matter of expediency. I would use the built-in workflow + convenient design of pages and list views.

But what if the reconciliation process looks like in Figure 2? Here, the negotiation process is non-linear, and the route depends on several conditions.

Figure 2 - Non-linear matching scheme

In the documentation support department (2nd step), upon receiving a draft document, they may decide that additional coordinators should be added to the process. In addition, the project should be sent for approval to the financial director only under the condition that the amount of the project agreement is more than 900,000 rubles.

As for the possible means, the situation here is different:
1. Use Sharepoint's embedded approval business process

The embedded process does not support branching, which means it will not work for solving the problem.

2. Process Modeling in Sharepoint Designer

If I were given a condition to model the process in the Sharepoint Designer, I would, somewhat cursing, write something similar to what is shown in Figure 3.

Figure 3 - Workflow in Sharepoint Designer

With a set of conditional operators, and custom forms of tasks, such as shown in Figure 4, the process can be implemented.

Figure 4 - Custom Task in Sharepoint Designer

Advantages of the approach:
1. With some training, perseverance and free time, a competent manager or an adequate administrator will cope with this task.
2. The process can be reconfigured.
3. The ability to limit the rights of the user creating the workflow.

Cons of the approach:
1. looks cumbersome and opaque.
2. With more branches, you will have to draw a workflow diagram on a piece of paper separately - by how it looks in the Sharepoint Designer, it is difficult to understand something.
3. In Sharepoint Designer 2010, cycles in workflows have not yet been invented, so restarting the process in case of failure will fail, at least by obvious methods.
4. A large number of additional actions that do not relate to the logic of the process.

3. Creating a workflow in Visual Studio

Visual Studio allows you to create arbitrarily flexible and complex business processes. For example, part of the process described above might look something like this (Figure 5):

Figure 5 - Fragment of the Visual Studio workflow

Logic can be controlled using While loops, If-Else and ConditionalActivity branches ( http://msdn.microsoft.com/ru-ru/library/hh824675 (v = office 14 ).aspx for more details).

Advantages of the approach:
1. High logical flexibility
2. Features .NET

Cons of the approach:
1. the complexity of implementation, making changes.
2. Programming and farm administrator rights are required.
3. Transparency only during the writing process and with serious documentation.

4. EOS for Sharepoint

Eos for Sharepoint is a complete electronic document management system. The visual process editor is not here, but there is a built-in constructor, which, upon closer inspection, turns out to be quite powerful and easy to use. Thus, the process described above consists of the sequential adjustment of all stages (Figures 6,7,8).

Figure 6 - Selection of participants of the stage


Figure 7 - Startup conditions for the workflow

For each stage, you can select participants, automatically set permissions, determine the method of maintaining the workflow history (Figure 6), configure launch conditions and query the fields for the value of the user (Figure 7). For the stage where additional approvals are required, you can run a separate customized reconciliation workflow.

After completing the configuration of each stage, you can configure the parameters of the workflow as a whole: for example, restarting the workflow in case of a failure of one of the coordinators (in this workflow will start from the first stage, Figure 8).

Figure 8 - Setting the parameters of the workflow

Using the consistent configuration of each stage in EOS for Sharepoint, you can simulate the business process of reconciling any complexity in a fairly short time. No additional actions, checks and validations - any more or less competent IT specialist will cope with the creation of the process.

Conclusion


The choice of how to automate Sharepoint business processes depends, for the most part, on its complexity. If the process is very simple - it is enough to use standard tools. If the process is complex and ramified, the implementation of its logic in SPD or Visual Studio can be lengthy and complex, in this case, it will be more efficient to use third-party tools that allow you to focus on the logic of the process without going into implementation details.

Source: https://habr.com/ru/post/185470/


All Articles