Skip to content

Commit f4cd47d

Browse files
authored
Merge pull request #101 from OrleansContrib/master - Releasing v0.3.0
2 parents 73ced93 + 9aea9b8 commit f4cd47d

File tree

75 files changed

+896
-319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+896
-319
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.png filter=lfs diff=lfs merge=lfs -text
2+
*.ico filter=lfs diff=lfs merge=lfs -text

README.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# Orleans.Activities
1+
# ![Orleans logo](https://github.com/OrleansContrib/Orleans.Activities/raw/master/src/Orleans.Activities.png) Orleans.Activities
22

3-
![Orleans logo](https://raw.githubusercontent.com/OrleansContrib/Orleans.Activities/master/src/Orleans.Activities.png)
4-
5-
Workflow Foundation (.Net 4.x System.Activities workflows) over Microsoft.Orleans framework to provide stable, long-running, extremely scalable processes with XAML designer support.
3+
Workflow Foundation (.Net 4.x System.Activities workflows) over [Microsoft Orleans](https://github.com/dotnet/orleans) framework to provide stable, long-running, extremely scalable processes with XAML designer support.
64

75
__Stable:__
8-
[![GitHub version](https://badge.fury.io/gh/OrleansContrib%2FOrleans.Activities.svg)](https://badge.fury.io/gh/OrleansContrib%2FOrleans.Activities)
9-
[![NuGet version](https://badge.fury.io/nu/Orleans.Activities.svg)](https://badge.fury.io/nu/Orleans.Activities)
6+
[![GitHub version](https://img.shields.io/github/tag/OrleansContrib/Orleans.Activities.svg)](https://github.com/OrleansContrib/Orleans.Activities/releases)
7+
[![NuGet version](https://img.shields.io/nuget/v/Orleans.Activities.svg)](https://www.nuget.org/packages/Orleans.Activities)
108

119
__Master:__
12-
[![Build status](https://ci.appveyor.com/api/projects/status/dy600wk9qn1fppqw/branch/master?svg=true)](https://ci.appveyor.com/project/OrleansContrib/orleans-activities)
10+
[![Build status](https://ci.appveyor.com/api/projects/status/dy600wk9qn1fppqw/branch/master?svg=true)](https://ci.appveyor.com/project/OrleansContrib/orleans-activities/history)
1311
[AppVeyor project feed (NuGet source)](https://ci.appveyor.com/nuget/orleans-activities-xqh82aku7sb3)
1412

1513
__Stats:__
@@ -24,24 +22,24 @@ __Issues:__
2422

2523
~~Documentation~~ (see [Samples](https://github.com/OrleansContrib/Orleans.Activities#samples) below)
2624

27-
[Branching Guidelines](https://github.com/OrleansContrib/Orleans.Activities/blob/docs-master/docs/Branching-Guidelines.md)
28-
29-
[Coding Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md)
30-
31-
[Design Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/framework-design-guidelines-digest.md)
25+
Guidelines
26+
* [Branching Guidelines](https://github.com/OrleansContrib/Orleans.Activities/blob/docs-master/docs/Branching-Guidelines.md)
27+
* [CI Guidelines](https://github.com/OrleansContrib/Orleans.Activities/blob/docs-master/docs/CI-Guidelines.md)
28+
* [Coding Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md)
29+
* [Design Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/framework-design-guidelines-digest.md)
3230

3331
This project is licensed under the [Apache License](https://github.com/OrleansContrib/Orleans.Activities/blob/master/LICENSE).
3432

3533
## Concept
3634

37-
![Overview](https://raw.githubusercontent.com/OrleansContrib/Orleans.Activities/docs-master/docs/Orleans.Activities-Overview.png)
35+
![Overview](https://github.com/OrleansContrib/Orleans.Activities/raw/docs-master/docs/Orleans.Activities-Overview.png)
3836

3937
This is a very high level view:
4038

41-
* Each WorkflowGrain is indistinguishable from a normal grain and backed by a WorkflowHost.
42-
* The WorkflowHost is responsible to handle the lifecycle of the WorkflowInstance, mainly recreate it from a previous persisted state when it aborts.
43-
* The communication between the WorkflowGrain and the WorkflowHost is based on 2 developer defined interfaces for the incoming and outgoing requests (TWorkflowInterface and TWorkflowCallbackInterface). These interfaces' methods can be referenced from the workflow activities to accept incoming or to initiate outgoing requests.
44-
* The methods of the TWorkflowInterface and TWorkflowCallbackInterface are independent from the grain's external public interface, you can merge different public requests into one method or vice versa. Or a reentrant grain even can execute (read-only) public interface methods independently from the current running workflow operations.
39+
* Each `WorkflowGrain` is indistinguishable from a normal grain and backed by a `WorkflowHost`.
40+
* The `WorkflowHost` is responsible to handle the lifecycle of the `WorkflowInstance`, mainly recreate it from a previous persisted state when it aborts.
41+
* The communication between the `WorkflowGrain` and the `WorkflowHost` is based on 2 developer defined interfaces for the incoming and outgoing requests (`TWorkflowInterface` and `TWorkflowCallbackInterface`). These interfaces' methods can be referenced from the workflow activities to accept incoming or to initiate outgoing requests.
42+
* The methods of the `TWorkflowInterface` and `TWorkflowCallbackInterface` are independent from the grain's external public interface, you can merge different public requests into one method or vice versa. Or a reentrant grain even can execute (read-only) public interface methods independently from the current running workflow operations.
4543
* The method's signatures are restricted, their parameters and return values are lazy, async delegates with 1 optional parameter/return value. The delegates executed by the workflow activities if/when they accept them (command pattern).
4644
* There are design-, build- and static-run-time checks to keep the interfaces and the workflows in sync.
4745
* Though you can execute complete workflows as methods also.
@@ -57,7 +55,7 @@ If it's needed, a mainly computational workflow can be executed also, even witho
5755
Implemented:
5856

5957
* Persistence (compatible with legacy workflow extensions)
60-
* Reminders (compatible with legacy Delay activities, though 1 min. is the minimum)
58+
* Reminders (compatible with legacy Delay activities)
6159
* Tracking
6260
* Designer support
6361
* Nearly all legacy activities are supported (except TransactionScope and messaging activities)
@@ -82,7 +80,6 @@ Under construction:
8280
Not implemented, help wanted (for design and for implementation):
8381

8482
* DynamicUpdateMap support (updating loaded workflows to a newer definition version), though the separation of the application logic (the plain C# delegates) and the process (the diagram) results in a very simple workflow diagram, that has a big chance you won't need to update when it runs
85-
* TransactionScope activity support (see https://github.com/dotnet/orleans/issues/1090)
8683
* See all [Help Wanted issues](http://waffle.io/OrleansContrib/Orleans.Activities?label=Status-Help%20Wanted) (filtered view)
8784

8885
And there are nearly unlimited [Open issues](http://waffle.io/OrleansContrib/Orleans.Activities)...
@@ -97,4 +94,4 @@ And there are nearly unlimited [Open issues](http://waffle.io/OrleansContrib/Orl
9794

9895
This is still an overview, all the details of the classes are hidden. The goal is to give a map to understand the relations between the classes. See the comments in the source!
9996

100-
![Overview](https://raw.githubusercontent.com/OrleansContrib/Orleans.Activities/docs-master/docs/Orleans.Activities-Details.png)
97+
![Overview](https://github.com/OrleansContrib/Orleans.Activities/raw/docs-master/docs/Orleans.Activities-Details.png)

appveyor.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
install:
66
- ps: Update-AppveyorBuild -Version "$([regex]::match([IO.File]::ReadAllText("$env:APPVEYOR_BUILD_FOLDER\src\GlobalAssemblyInfo.cs"), 'AssemblyInformationalVersion\(\"(\d+\.\d+\.\d+)\"\)').Groups[1].Value)$env:APPVEYOR_BUILD_VERSION"
77
- ps: Set-AppveyorBuildVariable -Name productversion -Value "$([regex]::match([IO.File]::ReadAllText("$env:APPVEYOR_BUILD_FOLDER\src\GlobalAssemblyInfo.cs"), 'AssemblyInformationalVersion\(\"(\d+\.\d+\.\d+)\"\)').Groups[1].Value)"
8-
os: Visual Studio 2015
8+
os: Visual Studio 2017
99
configuration: Debug
1010
assembly_info:
1111
patch: true
@@ -28,7 +28,7 @@
2828
install:
2929
- ps: Update-AppveyorBuild -Version "$([regex]::match([IO.File]::ReadAllText("$env:APPVEYOR_BUILD_FOLDER\src\GlobalAssemblyInfo.cs"), 'AssemblyInformationalVersion\(\"(\d+\.\d+\.\d+)\"\)').Groups[1].Value)$env:APPVEYOR_BUILD_VERSION"
3030
- ps: Set-AppveyorBuildVariable -Name productversion -Value "$([regex]::match([IO.File]::ReadAllText("$env:APPVEYOR_BUILD_FOLDER\src\GlobalAssemblyInfo.cs"), 'AssemblyInformationalVersion\(\"(\d+\.\d+\.\d+)\"\)').Groups[1].Value)"
31-
os: Visual Studio 2015
31+
os: Visual Studio 2017
3232
configuration: Release
3333
assembly_info:
3434
patch: true

src/GlobalAssemblyInfo.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Reflection;
1+
using System.Reflection;
22

33
[assembly: AssemblyCompany("OrleansContrib")]
44
[assembly: AssemblyProduct("Orleans.Activities - https://github.com/OrleansContrib/Orleans.Activities")]
5-
[assembly: AssemblyCopyright("Copyright © OrleansContrib 2016")]
5+
[assembly: AssemblyCopyright("Copyright © 2016-2017 OrleansContrib")]
66

7-
[assembly: AssemblyVersion("0.2.0")]
8-
[assembly: AssemblyFileVersion("0.2.0")]
9-
[assembly: AssemblyInformationalVersion("0.2.0")]
7+
[assembly: AssemblyVersion("0.3.0")]
8+
[assembly: AssemblyFileVersion("0.3.0")]
9+
[assembly: AssemblyInformationalVersion("0.3.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
using Orleans.Activities.Helpers;
8+
9+
namespace Orleans.Activities.Test.Activities
10+
{
11+
public interface IWorkflowCallbackInterfaceValueType
12+
{
13+
Task<Func<Task<int>>> OnOperationWithParamsAsync(int receiveResult);
14+
Task<Func<Task>> OnOperationWithoutParamsAsync();
15+
Task<Func<Task>> OnOperationThrowsBeginAsync();
16+
Task<Func<Task>> OnOperationThrowsEndAsync();
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
using Orleans.Activities.Helpers;
8+
9+
namespace Orleans.Activities.Test.Activities
10+
{
11+
public interface IWorkflowInterfaceValueType
12+
{
13+
Task<int> OperationWithParamsAsync(Func<Task<int>> requestResult);
14+
Task OperationWithoutParamsAsync(Func<Task> requestResult);
15+
}
16+
}

src/Orleans.Activities.Test.Activities/Orleans.Activities.Test.Activities.csproj

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,7 +11,7 @@
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>Orleans.Activities.Test.Activities</RootNamespace>
1313
<AssemblyName>Orleans.Activities.Test.Activities</AssemblyName>
14-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1515
<FileAlignment>512</FileAlignment>
1616
<TargetFrameworkProfile />
1717
</PropertyGroup>
@@ -47,6 +47,8 @@
4747
<Reference Include="System.Xml.Linq" />
4848
</ItemGroup>
4949
<ItemGroup>
50+
<Compile Include="IWorkflowCallbackInterfaceValueType.cs" />
51+
<Compile Include="IWorkflowInterfaceValueType.cs" />
5052
<Compile Include="IWorkflowInterface.cs" />
5153
<Compile Include="IWorkflowCallbackInterface.cs" />
5254
<Compile Include="NativeDelay.cs" />
@@ -200,6 +202,18 @@
200202
<SubType>Designer</SubType>
201203
</XamlAppDef>
202204
</ItemGroup>
205+
<ItemGroup>
206+
<XamlAppDef Include="WorkflowCallbackInterfaceOperationValueType.xaml">
207+
<Generator>MSBuild:Compile</Generator>
208+
<SubType>Designer</SubType>
209+
</XamlAppDef>
210+
</ItemGroup>
211+
<ItemGroup>
212+
<XamlAppDef Include="WorkflowInterfaceOperationValueType.xaml">
213+
<Generator>MSBuild:Compile</Generator>
214+
<SubType>Designer</SubType>
215+
</XamlAppDef>
216+
</ItemGroup>
203217
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
204218
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
205219
Other similar extension points exist, see Microsoft.Common.targets.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<Activity mc:Ignorable="sap sap2010 sads" x:Class="Orleans.Activities.Test.Activities.WorkflowCallbackInterfaceOperationValueType" sap2010:ExpressionActivityEditor.ExpressionActivityEditor="C#" sap2010:WorkflowViewState.IdRef="Orleans.Activities.Test.Activities.WorkflowCallbackInterfaceOperation_1"
2+
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
3+
xmlns:local="clr-namespace:Orleans.Activities.Test.Activities"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
6+
xmlns:oa="clr-namespace:Orleans.Activities;assembly=Orleans.Activities"
7+
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
8+
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
9+
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
10+
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
11+
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
12+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
13+
<TextExpression.NamespacesForImplementation>
14+
<sco:Collection x:TypeArguments="x:String">
15+
<x:String>System</x:String>
16+
<x:String>System.Collections.Generic</x:String>
17+
<x:String>System.Data</x:String>
18+
<x:String>System.Linq</x:String>
19+
<x:String>System.Text</x:String>
20+
</sco:Collection>
21+
</TextExpression.NamespacesForImplementation>
22+
<TextExpression.ReferencesForImplementation>
23+
<sco:Collection x:TypeArguments="AssemblyReference">
24+
<AssemblyReference>Microsoft.CSharp</AssemblyReference>
25+
<AssemblyReference>System</AssemblyReference>
26+
<AssemblyReference>System.Activities</AssemblyReference>
27+
<AssemblyReference>System.Core</AssemblyReference>
28+
<AssemblyReference>System.Data</AssemblyReference>
29+
<AssemblyReference>System.Drawing</AssemblyReference>
30+
<AssemblyReference>System.Runtime.Serialization</AssemblyReference>
31+
<AssemblyReference>System.ServiceModel</AssemblyReference>
32+
<AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
33+
<AssemblyReference>System.Xaml</AssemblyReference>
34+
<AssemblyReference>System.Xml</AssemblyReference>
35+
<AssemblyReference>System.Xml.Linq</AssemblyReference>
36+
<AssemblyReference>Orleans.Activities</AssemblyReference>
37+
<AssemblyReference>mscorlib</AssemblyReference>
38+
<AssemblyReference>Orleans.Activities.Test.Activities</AssemblyReference>
39+
</sco:Collection>
40+
</TextExpression.ReferencesForImplementation>
41+
<oa:WorkflowActivity x:TypeArguments="local:IWorkflowInterfaceValueType, local:IWorkflowCallbackInterfaceValueType" sap2010:WorkflowViewState.IdRef="WorkflowActivity`2_1">
42+
<Parallel sap2010:WorkflowViewState.IdRef="Parallel_1">
43+
<oa:SendRequestReceiveResponseScope sap2010:WorkflowViewState.IdRef="SendRequestReceiveResponseScope_2">
44+
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_3">
45+
<oa:SendRequest sap2010:WorkflowViewState.IdRef="SendRequest_1" OperationName="IWorkflowCallbackInterfaceValueType.OnOperationWithoutParamsAsync" />
46+
<oa:ReceiveResponse sap2010:WorkflowViewState.IdRef="ReceiveResponse_1" />
47+
</Sequence>
48+
</oa:SendRequestReceiveResponseScope>
49+
<oa:SendRequestReceiveResponseScope sap2010:WorkflowViewState.IdRef="SendRequestReceiveResponseScope_3">
50+
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_4">
51+
<Sequence.Variables>
52+
<Variable x:TypeArguments="x:Int32" Name="responseResult" />
53+
</Sequence.Variables>
54+
<oa:SendRequest x:TypeArguments="x:Int32" sap2010:WorkflowViewState.IdRef="SendRequest`1_2" OperationName="IWorkflowCallbackInterfaceValueType.OnOperationWithParamsAsync" RequestParameter="42" />
55+
<oa:ReceiveResponse x:TypeArguments="x:Int32" sap2010:WorkflowViewState.IdRef="ReceiveResponse`1_2">
56+
<oa:ReceiveResponse.ResponseResult>
57+
<OutArgument x:TypeArguments="x:Int32">
58+
<mca:CSharpReference x:TypeArguments="x:Int32">responseResult</mca:CSharpReference>
59+
</OutArgument>
60+
</oa:ReceiveResponse.ResponseResult>
61+
</oa:ReceiveResponse>
62+
<WriteLine sap2010:WorkflowViewState.IdRef="WriteLine_2">
63+
<InArgument x:TypeArguments="x:String">
64+
<mca:CSharpValue x:TypeArguments="x:String">responseResult.ToString()</mca:CSharpValue>
65+
</InArgument>
66+
</WriteLine>
67+
</Sequence>
68+
</oa:SendRequestReceiveResponseScope>
69+
</Parallel>
70+
<sads:DebugSymbol.Symbol>d4IBWjpcTG9jYWxcR2l0SHViXGxtYWd5YXJcT3JsZWFucy5BY3Rpdml0aWVzXHNyY1xPcmxlYW5zLkFjdGl2aXRpZXMuVGVzdC5BY3Rpdml0aWVzXFdvcmtmbG93Q2FsbGJhY2tJbnRlcmZhY2VPcGVyYXRpb25WYWx1ZVR5cGUueGFtbA4pA0cZAgEBKgVFEAIBAisHMCwCARIxB0QsAgEDLAkvFAIBGDIJQxQCAQktCy2fAQIBGi4LLlUCARk2CzbOAQIBEDcLPSACAQ0+C0IXAgEKNscBNssBAgEROhE6ZAIBDkAPQGYCAQs=</sads:DebugSymbol.Symbol>
71+
</oa:WorkflowActivity>
72+
<sap2010:WorkflowViewState.ViewStateManager>
73+
<sap2010:ViewStateManager>
74+
<sap2010:ViewStateData Id="SendRequest_1" sap:VirtualizedContainerService.HintSize="304,63" />
75+
<sap2010:ViewStateData Id="ReceiveResponse_1" sap:VirtualizedContainerService.HintSize="304,22" />
76+
<sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="326,249">
77+
<sap:WorkflowViewStateService.ViewState>
78+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
79+
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
80+
</scg:Dictionary>
81+
</sap:WorkflowViewStateService.ViewState>
82+
</sap2010:ViewStateData>
83+
<sap2010:ViewStateData Id="SendRequestReceiveResponseScope_2" sap:VirtualizedContainerService.HintSize="352,505" />
84+
<sap2010:ViewStateData Id="SendRequest`1_2" sap:VirtualizedContainerService.HintSize="315,89" />
85+
<sap2010:ViewStateData Id="ReceiveResponse`1_2" sap:VirtualizedContainerService.HintSize="315,62" />
86+
<sap2010:ViewStateData Id="WriteLine_2" sap:VirtualizedContainerService.HintSize="315,62" />
87+
<sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="337,417">
88+
<sap:WorkflowViewStateService.ViewState>
89+
<scg:Dictionary x:TypeArguments="x:String, x:Object">
90+
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
91+
</scg:Dictionary>
92+
</sap:WorkflowViewStateService.ViewState>
93+
</sap2010:ViewStateData>
94+
<sap2010:ViewStateData Id="SendRequestReceiveResponseScope_3" sap:VirtualizedContainerService.HintSize="363,505" />
95+
<sap2010:ViewStateData Id="Parallel_1" sap:VirtualizedContainerService.HintSize="869,551" />
96+
<sap2010:ViewStateData Id="WorkflowActivity`2_1" sap:VirtualizedContainerService.HintSize="895,639" />
97+
<sap2010:ViewStateData Id="Orleans.Activities.Test.Activities.WorkflowCallbackInterfaceOperation_1" sap:VirtualizedContainerService.HintSize="935,719" />
98+
</sap2010:ViewStateManager>
99+
</sap2010:WorkflowViewState.ViewStateManager>
100+
</Activity>

0 commit comments

Comments
 (0)