Index: Core/Common/src/Core.Common.Base/Service/Activity.cs
===================================================================
diff -u -r5e6503b31c813b6f1c4d4dfbab28092bcf4809a6 -rf0848e8a2e86a7c762a119f7d21c0e8c0223f85e
--- Core/Common/src/Core.Common.Base/Service/Activity.cs (.../Activity.cs) (revision 5e6503b31c813b6f1c4d4dfbab28092bcf4809a6)
+++ Core/Common/src/Core.Common.Base/Service/Activity.cs (.../Activity.cs) (revision f0848e8a2e86a7c762a119f7d21c0e8c0223f85e)
@@ -7,7 +7,7 @@
{
///
/// Abstract class that can be used for performing activies (like calculations, data imports, data exports, etc.).
- /// The regular workflow for completely performing an is: -> .
+ /// The regular workflow for completely performing an is: -> .
/// can be called for cancelling a running .
///
public abstract class Activity
@@ -65,8 +65,6 @@
{
try
{
- Status = ActivityStatus.Executing;
-
OnExecute();
if (Status == ActivityStatus.Failed ||
@@ -98,7 +96,7 @@
///
public void Cancel()
{
- ChangeState(OnCancel, ActivityStatus.Cancelling, ActivityStatus.Cancelled);
+ ChangeState(OnCancel, ActivityStatus.Cancelled);
}
///
@@ -109,7 +107,7 @@
{
if (Status != ActivityStatus.Failed && Status != ActivityStatus.Cancelled)
{
- ChangeState(OnFinish, ActivityStatus.Finishing, ActivityStatus.Finished);
+ ChangeState(OnFinish, ActivityStatus.Finished);
}
}
@@ -144,11 +142,10 @@
}
}
- private void ChangeState(Action transitionAction, ActivityStatus statusBefore, ActivityStatus statusAfter)
+ private void ChangeState(Action transitionAction, ActivityStatus statusAfter)
{
try
{
- Status = statusBefore;
transitionAction();
if (Status == ActivityStatus.Failed)
Index: Core/Common/src/Core.Common.Base/Service/ActivityStatus.cs
===================================================================
diff -u -r5e6503b31c813b6f1c4d4dfbab28092bcf4809a6 -rf0848e8a2e86a7c762a119f7d21c0e8c0223f85e
--- Core/Common/src/Core.Common.Base/Service/ActivityStatus.cs (.../ActivityStatus.cs) (revision 5e6503b31c813b6f1c4d4dfbab28092bcf4809a6)
+++ Core/Common/src/Core.Common.Base/Service/ActivityStatus.cs (.../ActivityStatus.cs) (revision f0848e8a2e86a7c762a119f7d21c0e8c0223f85e)
@@ -1,48 +1,37 @@
namespace Core.Common.Base.Service
{
///
- /// Defines possible states of the activity.
+ /// Enumeration that defines the possible states of an .
///
public enum ActivityStatus
{
///
- /// Activity has been just created and not used yet.
+ /// The state of an that has been just created and is not used yet.
///
None,
///
- /// Activity is currently executing.
+ /// The state of an that is successfully ran.
+ ///
///
- Executing,
-
- ///
- /// Activity has executed.
- ///
Executed,
///
- /// Activity is finishing.
+ /// The state of an that is not successfully ran.
+ ///
///
- Finishing,
-
- ///
- /// Activity has finished successfully.
- ///
- Finished,
-
- ///
- /// Activity has run but failed to complete.
- ///
Failed,
///
- /// Activite execution is being cancelled.
+ /// The state of an that has been cancelled.
+ ///
///
- Cancelling,
+ Cancelled,
///
- /// Activity execution has been cancelled.
+ /// The state of an that is successfully finished.
+ ///
///
- Cancelled
+ Finished
}
}
\ No newline at end of file