File: IWorkflowInstanceManagement.cs

package info (click to toggle)
mono 4.6.2.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 778,148 kB
  • ctags: 914,052
  • sloc: cs: 5,779,509; xml: 2,773,713; ansic: 432,645; sh: 14,749; makefile: 12,361; perl: 2,488; python: 1,434; cpp: 849; asm: 531; sql: 95; sed: 16; php: 1
file content (163 lines) | stat: -rw-r--r-- 9,923 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
//-----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

namespace System.ServiceModel.Activities
{
    using System.Collections.Generic;
    using System.Runtime;
    using System.Activities;
    using System.ServiceModel;
    using System.ServiceModel.Activities.Description;

    [WorkflowContractBehaviorAttribute]
    [ServiceContract(Name = XD2.WorkflowInstanceManagementService.ContractName, Namespace = XD2.WorkflowServices.Namespace)]
    public interface IWorkflowInstanceManagement
    {
        // Non-Transacted operations
        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Abandon)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance not found")]
        void Abandon(Guid instanceId, string reason);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Abandon, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "Abandon")]
        IAsyncResult BeginAbandon(Guid instanceId, string reason, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Abandon")]
        void EndAbandon(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Cancel)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is supended or locked under transaction")]
        void Cancel(Guid instanceId);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Cancel, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "Cancel")]
        IAsyncResult BeginCancel(Guid instanceId, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Cancel")]
        void EndCancel(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Run)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is locked under transaction")]
        void Run(Guid instanceId);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Run, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "Run")]
        IAsyncResult BeginRun(Guid instanceId, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Run")]
        void EndRun(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Suspend)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is locked under transaction")]
        void Suspend(Guid instanceId, string reason);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Suspend, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "Suspend")]
        IAsyncResult BeginSuspend(Guid instanceId, string reason, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Suspend")]
        void EndSuspend(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Terminate)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is supended or locked under transaction")]
        void Terminate(Guid instanceId, string reason);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Terminate, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "Terminate")]
        IAsyncResult BeginTerminate(Guid instanceId, string reason, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Terminate")]
        void EndTerminate(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Unsuspend)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is locked under transaction")]
        void Unsuspend(Guid instanceId);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Unsuspend, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "Unsuspend")]
        IAsyncResult BeginUnsuspend(Guid instanceId, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Unsuspend")]
        void EndUnsuspend(IAsyncResult result);

        //Transacted Operation
        // TODO, 21237, Post One-Way Tx flow support below operations should be changed to Oneway.        

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedCancel)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is supended or locked under transaction")]
        void TransactedCancel(Guid instanceId);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedCancel, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "TransactedCancel")]
        IAsyncResult BeginTransactedCancel(Guid instanceId, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "TransactedCancel")]
        void EndTransactedCancel(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedRun)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is supended or locked under transaction")]
        void TransactedRun(Guid instanceId);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedRun, AsyncPattern = true)]
        [Fx.Tag.InheritThrows(From = "TransactedRun")]
        IAsyncResult BeginTransactedRun(Guid instanceId, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "TransactedRun")]
        void EndTransactedRun(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedSuspend)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is supended or locked under transaction")]
        void TransactedSuspend(Guid instanceId, string reason);

        [OperationContract(AsyncPattern = true, Name = XD2.WorkflowInstanceManagementService.TransactedSuspend)]
        [Fx.Tag.InheritThrows(From = "TransactedSuspend")]
        IAsyncResult BeginTransactedSuspend(Guid instanceId, string reason, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "TransactedSuspend")]
        void EndTransactedSuspend(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedTerminate)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is supended or locked under transaction")]
        void TransactedTerminate(Guid instanceId, string reason);

        [OperationContract(AsyncPattern = true, Name = XD2.WorkflowInstanceManagementService.TransactedTerminate)]
        [Fx.Tag.InheritThrows(From = "TransactedTerminate")]
        IAsyncResult BeginTransactedTerminate(Guid instanceId, string reason, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "TransactedTerminate")]
        void EndTransactedTerminate(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedUnsuspend)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance with specified identifier not found or it is locked under a transaction")]
        void TransactedUnsuspend(Guid instanceId);

        [OperationContract(AsyncPattern = true, Name = XD2.WorkflowInstanceManagementService.TransactedUnsuspend)]
        [Fx.Tag.InheritThrows(From = "TransactedUnsuspend")]
        IAsyncResult BeginTransactedUnsuspend(Guid instanceId, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "TransactedUnsuspend")]
        void EndTransactedUnsuspend(IAsyncResult result);
    }

    [WorkflowContractBehaviorAttribute]
    [ServiceContract(Name = XD2.WorkflowInstanceManagementService.ContractName, Namespace = XD2.WorkflowServices.Namespace,
        ConfigurationName = XD2.WorkflowInstanceManagementService.ConfigurationName)]
    public interface IWorkflowUpdateableInstanceManagement : IWorkflowInstanceManagement
    {
        [OperationContract(Name = XD2.WorkflowInstanceManagementService.Update)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance not found, locked under transaction, or update unsuccessful")]
        void Update(Guid instanceId, WorkflowIdentity updatedDefinitionIdentity);

        [OperationContract(AsyncPattern = true, Name = XD2.WorkflowInstanceManagementService.Update)]
        [Fx.Tag.InheritThrows(From = "Update")]
        IAsyncResult BeginUpdate(Guid instanceId, WorkflowIdentity updatedDefinitionIdentity, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "Update")]
        void EndUpdate(IAsyncResult result);

        [OperationContract(Name = XD2.WorkflowInstanceManagementService.TransactedUpdate)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [Fx.Tag.Throws(typeof(FaultException), "Instance not found, locked under transaction, or update unsuccessful")]
        void TransactedUpdate(Guid instanceId, WorkflowIdentity updatedDefinitionIdentity);

        [OperationContract(AsyncPattern = true, Name = XD2.WorkflowInstanceManagementService.TransactedUpdate)]
        [Fx.Tag.InheritThrows(From = "TransactedUpdate")]
        IAsyncResult BeginTransactedUpdate(Guid instanceId, WorkflowIdentity updatedDefinitionIdentity, AsyncCallback callback, object state);
        [Fx.Tag.InheritThrows(From = "TransactedUpdate")]
        void EndTransactedUpdate(IAsyncResult result);
    }
}