Add an IActivity.Abort method allowing activities to define their abort results - #1420
Add an IActivity.Abort method allowing activities to define their abort results#14201nf0rmagician wants to merge 1 commit into
IActivity.Abort method allowing activities to define their abort results#1420Conversation
…bort results
Currently an activity only supports to `Complete` with a given result number (for which you need to know the possible results of the activity type and hence the activity type) and to `Fail`.
While the fact that `ICell.ProcessAborting` exists is a detail of a different namespace and should not lead implementation directly, this function would allow for more generic and activity independent cell implementations.
And since aborting an activity and having activity specific result creation has semantic meaning, this extension is proposed.
Example:
```csharp
void ICell.ProcessAborting(Activity affectedActivity)
{
var result = affectedActivity.Abort();
PublishActivityCompleted(_currentActivityStart.CreateResult());
}
```
|
@dbeuchler, @andreniggemann, @seveneleven let me know what you think about the idea 😊 |
|
I like the idea, but I have an alternative idea I would like to propose. Let's say we have different standardized results similar to the DefaultActivtyResult that includes the current values from the DefaultActivityResult, Aborted and maybe others. |
Sounds interesting to me. Any ideas how you would start to implement something like that @andreniggemann? Currently the results are only added as Attributes (and I'm not a big fan of changing it, as it would result in loads of changes in application code). I could not spin up an idea how to get to your proposed solution from the top of my head 🤔 |
Currently an activity only supports to
Completewith a given result number (for which you need to know the possible results of the activity type and hence the activity type) and toFail. While the fact thatICell.ProcessAbortingexists is a detail of a different namespace and should not lead implementation directly, this function would allow for more generic and activity independent cell implementations. And since aborting an activity and having activity specific result creation has semantic meaning, this extension is proposed.Example: