Introduction to workflow activity (sorted by vs toolbox letters)

Source: Internet
Author: User
After learning workflow for a while and seeing so many controls in Vs, I collected them and gave a brief introduction to them. For more information, please refer to the blog of tingfeng jieyin and lanmei zhuju.
Namespace:System. workflow. Activities
Assembly:System. workflow. Activities (in system. workflow. Activities. dll)
Introduction to various activities in workflow (sorted by vs toolbox letters)
Namespace: system. workflow. Activities
Assembly: system. workflow. Activities (in system. workflow. Activities. dll) 1. Introduction to the callexternalmethodactivity Control
Msdn: defines a workflow communication activity that is used to call a method on a local service. This activity is used to send data from the workflow to the host through the local service.
This control is mainly used to communicate with local services provided by the host process. The interfacetype attribute should be set first. The designer will automatically discover all available methods in the service through the interface we set. Once we set interfacetype as the previously defined interface, we can select the method to be called for the methodname attribute. The designer will also list the parameters required for this method in the attribute panel. We can bind the return values of these input parameters and methods to the domain or attribute of the workflow.
2. Code control Introduction
Msdn: runs the code-Beside method associated with an activity. This class cannot be inherited.
This control is mainly used to assist other activities in coding. It cannot be used for inheritance.
3. Introduction to the compensatablesequenceactivity Control
Msdn: defines a compensatable version of The sequenceactivity. This class cannot be inherited.
After searching for the sequenceactivity on the internet, add your own understanding: the sequenceactivity that can be compensated.
Handling (Compensation) of exceptions in execution of logical units );
4. Introduction to the transactionscope Control
Msdn: executes contained activities sequentially and in transaction.
The activity starts a transaction and implicitly records all activities contained in the transaction. For example, the bank transfer transaction processing, a complete transaction, either fully implemented or completely rolled back.
5. Introduction to the compensatabletransactionscopeactivity Control
Msdn: executes contained activities sequentially and in transaction and supports compensation.
The function is equivalent to the transacionscope with the compensation handler attached; the transaction class can manage transactions that use various types of persistent storage.
6. Introduction to the compensate control
Msdn: enabled compensating for scope supporting for longing running transaction.
Compensation for long-running transactions. even if the workflow needs to run for a long time, we do not want to let a transaction be executed for several hours, days, or even weeks. because the transaction locks the record before committing to prevent queries from other execution processes. however, long-term lock transactions not only erase the scalability of the program, but may even cause deadlocks.
7. Introduction to the conditionedactivitygroup Control
Msdn: provides the definition of a constraint-based execution context for a set of child activities.
Condition group. CAG is a powerful activity that can be achieved by combining rules and code. each step of the CAG operation checks whether the condition permits. we can add many activities to the CAG for execution. each of its subactivities is associated with a whencondition and only the executed whencondition is a real activity. the CAG repeats its sub-activities until its untilcondition is true.
8. Delay Control Introduction
Msdn: Provides the logic to establish a timer and to wait, asynchronously, for timer's expiration. This class cannot be inherited.
The function is similar to the timer control in. The delay activity initializes a timer and waits until it expires. delay activities are often used to simulate timeout. When the timer expires, the workflow engine continues to execute the task. the value of its timeoutduration attribute is of the timespan type, indicating the time to wait. you can initialize this attribute in the designer or change its value in the initializetimeoutduration event programmatically.
9. eventdriven control Introduction
Msdn: wraps an activity whose execution is initialized by an event. this class cannot be inherited. it is a compositeactivity that is used to handle an event; typically it can be raised from the host or by the run time In reponse to a delay timer expiring. eventdrivenactivity is inherited from sequenceactivity; therefore it is a sequence that has the additional restriction that the first activity shocould be an ieventactivity.
It is a status that depends on external events before execution can begin. It is a compositeactivity, so other activities. eventdrivenactivity must have an activity implemented on the eventactivity interface as its first sub-activity.
10. eventhandlingscope control Introduction
Msdn: Enables event handling with the execution of the Child activities. This class cannot be inherited.
The eventhandlingscope activity can contain multiple branches waiting for the event. eventhandlingscope listens to other events until its main sub-activities are completed.
11. faulthandler control Introduction
Msdn: enables execution of contained activities based on specified exception.
The catch process contains the exception of activities. Similar to the try... Catch Block function.
12. handleexternalevent control Introduction
Msdn: defines a workflow communication activity that is used to handle an event that is raised by a local service.
Capture exceptions caused by processing local services (Exceptions thrown by the host ).
13. ifelse control Introduction
Msdn: conditionally runs one of two or more activities of Type ifelsebranchactivity. This class cannot be inherited.
The function is similar to if... else block. You can add multiple branches.
14. invokewebservice control Introduction
Msdn: invokes a web service through a proxy class, passing and inserting ing parameters as specified. This class cannot be inherited.
Call web service. Pass or receive parameters. When you add the control, a wizard for Adding web references appears. You can complete the implementation of soaphttpclientprocotol in the Wizard.
15. Introduction to the invokeworkflow Control
Msdn: asynchronously runs one Workflow from another. This class cannot be inherited.
An activity can asynchronously execute another workflow. because the execution process is asynchronous, we cannot obtain the output parameters of another workflow, but we can establish an additional communication mechanism with the host to obtain its output. before starting another workflow, the invokeworkflow activity will trigger the invoking event, where you can write code to initialize parameters.
16. Introduction to the listen Control
Msdn: makes the workflow wait for any one of several possible events before the activity proceeds. This class cannot be inherited.
Listen for messages. This can listen on many messages at the same time. The listen activity can contain multiple branches. however, the difference is that the listen activity only aims to accomplish a score. the branch of a listen activity is an eventdriven activity. An eventdriven activity must start with the arrival of an event.
17. Introduction to parallel controls
Msdn: runs a set of child activities at the same time. This class cannot be inherited.
The parallel activity allows multiple activities to be executed at the same time, but the parallel activity does not adopt the multithreading mechanism, and only one thread is executed within the workflow.
18. Policy Control Introduction
Msdn: represents a collection of Rule class instances to be run as part of a workflow's execution as a single step/activity.
An integrated Rule instance is encapsulated to allow you to use these rules during workflow execution. policy activity is often not used directly (especially in the vs2005 Toolbox). You need to inherit from the policy activity and create a custom activity to use the policy activity and these rules.
19. Introduction to the replicator Control
Msdn: executes contained activities by creating specified number replicated instance.
The Replicator activity is similar to the while activity and more complex. By setting its executiontype attribute, replicator can process ordered or parallel data sets.
20. Sequence Control Introduction
Msdn: runs a set of child activities according to a single defined ordering.
Execute a series of activities in sequence until the last one.
21. Introduction to the suspend control
Msdn: suspends execution of workflow.
A node that suspends a process, which is used in the host.
22. Introduction to the synchronizationscope Control
Msdn: executes contained activities sequentially in a synchronized domain.
Perform activities within the synchronization range in sequence. We know that the parallel activity will execute each of its branches at the same time, and the synchronizationscope activity is the opposite. Its role is to stop the activities to be executed at the same time and let them execute one by one. the synchronizationhandles attribute contains the same synchronization handle. These synchronizationscope activities are not executed at the same time. When a synchronizationscope activity is completed, the same step handle is released, then, one of the other instances that have been waiting for a long time will get the synchronization handle and start execution. The other operations will be executed only after these activities are executed.
23. Introduction to the terminate Control
Msdn: terminates execution of workflow.
Similar to a suspend activity, a terminate activity can also suspend a workflow. the difference is that a workflow suspended with terminate cannot be resumed by the host (it is easier to understand the meaning of words: suspend, pause; terminate, terminate ). if the workflow has been executed to the point where it is impossible to continue (or restore), let's end it with this activity.
24. Throw
Msdn: enables raising exception in workflow.
An exception is thrown during workflow execution.
25. webservicefault
Msdn: enables sending a fault to the Web service client from the workflow. This class cannot be inherited.
The webservicefault activity allows us to throw an exception (runtime encapsulates this exception into a soap exception). Its fault attribute is used to reference the exception we want to throw.
26. webserviceinput
Msdn: enables grouping ing data from a Web service in a workflow. This class cannot be inherited.
The webserviceinput activity allows a workflow to receive a web service request. similar to the local communication activity discussed earlier, before using this activity, we need to define a contract (interface ). the webserviceinput activity implements this interface. after setting the interfacetype attribute of the activity, we can select the method inherited from the interface from the methodname attribute and bind its parameters to the domain or attribute of the workflow.
27. webserviceoutput
Msdn: enables sending data to a web service from within a workflow. This class cannot be inherited.
The webserviceoutput activity must be paired with the webserviceinput activity, which is responsible for responding to requests from the web service. the inputactivityname attribute of this activity is used to select the paired webserviceinput activity. Therefore, we cannot use this activity without the webserviceinput activity. the designer checks the interface and method names implemented by the pairing webserviceinput activity, and allows us to bind the returnvalue attribute to the domain or attribute of the workflow. The returnvalue attribute is the response to the web service.
28. While
Msdn: runs a Child Activity iteratively as long as a certain condition is true.
Similar to the while function of C #, The while activity will judge whether the condition is met before each loop. If the condition is met, the whileactivity will always run.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.