WF from entry to entry (Chapter 3): workflow instance notes

Source: Internet
Author: User
Properties of workflowinstance

Attribute Function
Instanceid Obtain the unique identifier (guid) of the workflow instance)
Workflowruntime Obtain the workflowruntime of this workflow instance.

Workflowinstance Method

Method Function
Applyworkflowchanges Apply for changes to the workflow instance through the workflowchanges object. This allows you to modify a workflow during execution (adding, removing, or changing activities). When a dynamic change is implemented, the workflow instance is paused.
Getworkflowdefinition Search for the root activity of this workflow instance.
Resume Resume the execution of the previously paused workflow instance. If the workflow instance is not paused, do not do anything. If the workflow instance is paused, The workflowresumed event is triggered after the workflow instance is restored.
Start Start the execution of a workflow instance and call executeactivity on the Root Activity of the workflow instance. If a start exception occurs, it calls terminate to terminate the workflow instance and append the exception information as the cause of termination.
Suspend Pause the workflow instance synchronously. If the workflow instance is already in the paused status, do not do anything. If the workflow instance is running, the instance will be paused when the workflow is running, and suspendorterminateinfoproperty (reasons) will be set and suspend will be triggered.
Terminate Terminate this workflow instance synchronously. When the host needs to terminate a workflow instance, the instance is terminated and the final state of the instance is persisted. Then workflowinstance sets suspendorterminateinfoproperty (indicating the reason) and enters terminate. Finally, it triggers the workflowterminated event and transmits the cause of termination to the Message attribute in workflowterminateexception and includes it in the parameter of the workflowterminatedeventargs event. In addition, if an exception occurs during persistence, the exception will be uploaded to the workflowterminatedeventargs event parameter during workflow runtime.

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.