Workflow is ... Description, application, functions

WorkFlow is a workflow (WF), which is a set of technologies included in PowerShell and available on any computer running Windows 7/8, Server 2008/2008 R2 / 2012. This is a special kind of PowerShell script that is very similar to a function. However, at startup, it converts the workflow into Windows Workflow Foundation (WWF) code and passes it for execution, after which its contents will be different from the script.

Workflow Basis

WorkFlow is a combination of traditional and modern programming tools for announcing a workflow and performing actions that help determine the logic, control flow, and runtime of the resulting application. WWF is the process of using a higher level language for writing software in order to increase developer productivity, simplify management, and quickly adapt. The WWF runtime not only executes the workflow, but also provides services and functions that are important when writing software logic, such as saving state, marking and resuming business logic, which leads to the efficiency of threads and processes.

The WWF programming model has been redesigned to make it simpler and more reliable. Activity is its basic basic type and represents both processes and operations. WW no longer needs to be created at run time to invoke a workflow, it can simply be formatted as an instance and executed, simplifying unit testing and software scripts in which the developer does not want to have difficulty setting up a specific environment. Finally, the programming model becomes a completely declarative composition of actions without code, which also simplifies development.





Using Net Framework

Net Framework




Foundation WorkFlow is a .Net Framework-based platform for creating workflows. This is not an application or server product, the software is included as a component of the .Net 3.0 framework.

Some of the main features of WW are listed below:

  1. Visual representation of the process.
  2. Dynamic change at runtime.
  3. Duration of functioning.

There are two main types of WW:

  1. Sequential, used for clearly defined processes.
  2. State machines are organized as state machine diagrams commonly used for WW with operational interaction, including Workflow translation.

WW can be built declaratively using only markup, or only code, or a combination of both. Once developed by WW, it can be hosted in any application that loads the runtime, such as Windows Forms, Windows Services, ASP.Net Web Sites, and Web Services.

Operations and Services

Operations and Services




WorkFlow operations are workflows that consist of one or more operations that are WW building blocks. A set of ready-made actions is provided to developers, you can also create your own. Services - a mechanism for executing WW using its own functions when executing an instance. You can use services in WW Foundation, configure available services, or create your own. WW in real life can have a long and unpredictable lead time. Windows WW Foundation processes all operations and can save workflows if necessary.





Compensation transactions in the WW world are different from traditional ones. In cases where there are lengthy processes, it is impossible to accurately roll back a set of actions when exceptions occur. Instead, WW allows for “compensation”, which in simple terms is an action taken to cover the effect of part of a transaction and has already been completed. The visual nature of the WW definition leads to the requirement to track the progress of a workflow. WW Foundation provides services for monitoring the status of process instances.

Designer Open Source Project

Designer Open Source Project




The WF designer offers many features out of the box, it is easy to expand, which is why many companies have integrated it into their products and solutions.

There are 3 types of workflows that are used in accordance with the requirements of the business case, they can be used together in mixed mode, and WF / Activity grouping is also possible:

  1. Serial WW is simple linear logic.
  2. WW flowchart is a very intuitive flowchart logic.
  3. Finite state machine WW - powerful, state transitions, events, triggers.

WW can be created visually, programmatically and using PowerShell scripts:

  1. Creation WW - Visual Studio.
  2. Create WW - Code.
  3. Creation of WW - Powershell Azure.

Serialization is done using Xaml, which makes WW very flexible:

  1. Serialization of WW Xml.
  2. Serialization WW - Xaml Code.
  3. Serialization WW - Powershell Visual Xaml.

At the same time, the strong dependence of WF on Xaml is one of the main obstacles to the transfer of WW Foundation to .Net Core.

Built-in libraries

Built-in libraries




Workflow Foundation offers built-in action libraries: control flow, state machine, flowchart, messaging, error collection and handling, powershell and others. The number and type of use cases that can be viewed using WW can be greatly expanded with user actions, you can create your own libraries and package existing third-party APIs for integration with WF. There are 3 options for placing and starting workflows, each of which is suitable for a specific use case:

  1. WorkflowInvoker, documentation and samples, suitable for simple scripts and short-lived WW, does not provide hosting, bookmarks, instance control, persistence.
  2. WW application, documentation and samples, one WF instance, WF loading / unloading is possible, a good choice for lengthy processes, provides hosting, bookmarks, instance control, persistence.
  3. WorkflowServices, documentation and samples, several instances good for service-oriented solutions, provides hosting (WorkflowServiceHost), messaging service, bookmarks, instance control, persistence.
  4. WF is a workflow manager.

Core Sharepoint Level

Workflow Manager is a very complex component of Foundation and the core level of Sharepoint. It is used in custom solutions and in Rehosted WF Designer. It offers a lot of useful things: REST Endpoint & Client API, Multi-tenancy (areas) and scaling, database storage management, tracking and monitoring, instance management, fully declarative authoring.

Nevertheless, the deployment is not easy when executed using custom installers, and it imposes on the solution the implementation of versions, instances, data warehouses. The Workflow Foundation performance log provides a high level of transparency regarding process logic. Custom member tracking is easy to implement and adapt to a specific use case. The Track method is called whenever a workflow generates a Tracking Record containing WF runtime data: logs and analytic data.

The standard SwTracking Participant model is a good starting point for implementing WW tracking. The Persistency feature, a key feature for long-running workflows, is available immediately after installation in WF if available data stores, Workflow Identity, and save actions are used. In addition to including new scenarios, this function also helps to scale resources vertically when there is WW as a service model, and it performs many work processes in parallel on the same server / VM:

  1. WF state will be deleted from memory until the next step or trigger;
  2. restores it from persistence data warehouse
  3. resumes the execution process.

Task automation in Apple iOS

Task automation in Apple iOS




Workflow is the most powerful application used by Apple iOS. Apple uses WF, a powerful automation tool designed to speed up everyday tasks. There are many triggers and actions in Workflow IOS that can be set inside the application and then performed from top to bottom with a simple click of a button. Moreover, since it was developed by Apple, it can access many system utilities. Using Apple iOS, you can quickly get the most popular news, for example from Apple News, or create a collage using some of the latest photos. In order to maximize the use of software, it is used to automate daily tasks.

Before starting automation, tasks download the Workflow system from the App Store, launch it, and click the "My Workflows" tab or the "Gallery" tab if you need to use a previously performed action. In the upper right corner, select "Create Workflow" and one of four WW.

Having selected WW, swipe right to open the "Actions" menu. From here, you can search for the desired action or select an action from the list of available offers. After selecting an action, drag it to the right to add it to the current WW. If you want to include an additional action that will be performed after the first, hold your finger to the right and repeat the process.

In order to change WW, click on the gear icon in the upper right corner. The resulting menu will contain many different settings, which will allow you to change the type of workflow. When everything is done, click “Finish” in the upper right corner to leave WW in the application, or select “Add to the main screen” to launch WW in the browser.

PowerShell Scenarios

Workflow PowerShell Scripts (PS)




Workflow PowerShell (PS) scripts are widely used, and many Windows administrators are familiar with them. The workflow and script are similar - each consists of a series of program steps or actions. PS can interact with Windows, as well as with some server applications at a low level. This allows the administrator to write almost any task imaginable. But PS scripts have some limitations; links to .NET can help overcome these limitations. For example, .NET can create graphical interfaces for them or perform mathematical operations that are not supported in PowerShell.

Workflows work in conjunction with the Windows Workflow Foundation (WWF), which is part of the .NET Framework. WWF includes an API and a process engine for creating. Like scenarios, WW consists of a series of actions, each of which performs a specific task. Administrators can combine several actions to create a complex PS workflow.

These actions are modeled as .NET actions. Framework contains a library of commonly used actions for creating workflows. Because PS scripts use the advanced features of the .NET Framework, they are very powerful and tied to the OS process. For example, when you open a PS window and run its script, this window is attached to the OS process, which becomes the execution space. In essence, the PSl window is an isolated environment.

Platform for work and exchange

Platform for work and exchange




SharePoint Workflow is a great collaboration and sharing platform. However, at any time when some kind of approval of the business process is required, it is necessary to use the capabilities of the workflow.

There are several ways to create WW in SharePoint:

  1. Without a workflow — if you need simple approval or some kind of notification, you can simply use the alerts feature in SharePoint along with some metadata columns.
  2. Content Verification Feature — Use the built-in content approval feature. It allows one-way content approval, but you can do the work in many simple approval scenarios.
  3. Ready-made workflows - Several ready-made (built-in) workflows are available that allow you to create more complex configurations.
  4. SharePoint Designer is a free tool available from Microsoft that creates more complex workflows with parallel and multi-stage sequential approval. A feature of SPD is that it may take some time to become familiar with how it works, and the tool itself can sometimes be quite complicated.
  5. Microsoft Flow is a cloud-based product that integrates with SharePoint and many other applications.
  6. Third-party WW tools that can be integrated with SharePoint.

Types of finished processes:

  1. WW approval.
  2. WW feedback collection.
  3. Signature collection Workflow.
  4. WW with three states.

Ready-made WWWs are good in very specific scenarios and do not allow for any significant settings, often associated with customizable business processes.

Advantages and disadvantages

Advantages and disadvantages




One of the advantages of WW is that it allows declarative logic of the software application, since most people do not want to write XAML manually, so the experience of the developer in WF is very important. Common scenarios where web developers primarily use the .NET workflow functionality:

  1. Various data sources, mainly databases, which are part of the WW application.
  2. Periodically changing application logic in which several steps are changed in WW.
  3. Isolated output (branched circuitry) that requires complex logic.
  4. Packet inputs that are part of the initial WW and have an undefined time frame.
  5. Maximum performance and application flexibility with respect to compatibility.

WW benefits:

  • flexibility;
  • runtime reports
  • integration with communication foundation;
  • dynamic configuration;
  • visual design of application logic.

The main disadvantage is the complex learning curve, when most programmers find it difficult to adapt to WW design methods.

The Workflow Foundation 3 BizTalk Server 2006 WF was introduced in 2006 with the .Net Framework version 3.0, and Visual Studio. It has also been integrated with BizTalk Server 2006 R2 through interceptors and BAM extensions (btsSend, bts Receive). Subsequently, starting in 2007, the development of WF was largely aligned with the Microsoft Sharepoint Roadmap.

Over the past 20 years, most programs have moved from low-level languages ​​to high-level languages. In today's industry, for solving everyday tasks such as allocating memory and rewriting code for different machines, this program is simply irreplaceable.




All Articles