Skip to content

Commit

Permalink
Merge pull request #101 from OrleansContrib/master - Releasing v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lmagyar authored May 28, 2017
2 parents 73ced93 + 9aea9b8 commit f4cd47d
Show file tree
Hide file tree
Showing 75 changed files with 896 additions and 319 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Orleans.Activities
# ![Orleans logo](https://github.com/OrleansContrib/Orleans.Activities/raw/master/src/Orleans.Activities.png) Orleans.Activities

![Orleans logo](https://raw.githubusercontent.com/OrleansContrib/Orleans.Activities/master/src/Orleans.Activities.png)

Workflow Foundation (.Net 4.x System.Activities workflows) over Microsoft.Orleans framework to provide stable, long-running, extremely scalable processes with XAML designer support.
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.

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

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

__Stats:__
Expand All @@ -24,24 +22,24 @@ __Issues:__

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

[Branching Guidelines](https://github.com/OrleansContrib/Orleans.Activities/blob/docs-master/docs/Branching-Guidelines.md)

[Coding Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md)

[Design Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/framework-design-guidelines-digest.md)
Guidelines
* [Branching Guidelines](https://github.com/OrleansContrib/Orleans.Activities/blob/docs-master/docs/Branching-Guidelines.md)
* [CI Guidelines](https://github.com/OrleansContrib/Orleans.Activities/blob/docs-master/docs/CI-Guidelines.md)
* [Coding Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md)
* [Design Guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/framework-design-guidelines-digest.md)

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

## Concept

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

This is a very high level view:

* Each WorkflowGrain is indistinguishable from a normal grain and backed by a WorkflowHost.
* The WorkflowHost is responsible to handle the lifecycle of the WorkflowInstance, mainly recreate it from a previous persisted state when it aborts.
* 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.
* 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.
* Each `WorkflowGrain` is indistinguishable from a normal grain and backed by a `WorkflowHost`.
* The `WorkflowHost` is responsible to handle the lifecycle of the `WorkflowInstance`, mainly recreate it from a previous persisted state when it aborts.
* 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.
* 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.
* 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).
* There are design-, build- and static-run-time checks to keep the interfaces and the workflows in sync.
* Though you can execute complete workflows as methods also.
Expand All @@ -57,7 +55,7 @@ If it's needed, a mainly computational workflow can be executed also, even witho
Implemented:

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

* 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
* TransactionScope activity support (see https://github.com/dotnet/orleans/issues/1090)
* See all [Help Wanted issues](http://waffle.io/OrleansContrib/Orleans.Activities?label=Status-Help%20Wanted) (filtered view)

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

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!

![Overview](https://raw.githubusercontent.com/OrleansContrib/Orleans.Activities/docs-master/docs/Orleans.Activities-Details.png)
![Overview](https://github.com/OrleansContrib/Orleans.Activities/raw/docs-master/docs/Orleans.Activities-Details.png)
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
install:
- 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"
- 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)"
os: Visual Studio 2015
os: Visual Studio 2017
configuration: Debug
assembly_info:
patch: true
Expand All @@ -28,7 +28,7 @@
install:
- 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"
- 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)"
os: Visual Studio 2015
os: Visual Studio 2017
configuration: Release
assembly_info:
patch: true
Expand Down
10 changes: 5 additions & 5 deletions src/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Reflection;
using System.Reflection;

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

[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0")]
[assembly: AssemblyInformationalVersion("0.2.0")]
[assembly: AssemblyVersion("0.3.0")]
[assembly: AssemblyFileVersion("0.3.0")]
[assembly: AssemblyInformationalVersion("0.3.0")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Orleans.Activities.Helpers;

namespace Orleans.Activities.Test.Activities
{
public interface IWorkflowCallbackInterfaceValueType
{
Task<Func<Task<int>>> OnOperationWithParamsAsync(int receiveResult);
Task<Func<Task>> OnOperationWithoutParamsAsync();
Task<Func<Task>> OnOperationThrowsBeginAsync();
Task<Func<Task>> OnOperationThrowsEndAsync();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Orleans.Activities.Helpers;

namespace Orleans.Activities.Test.Activities
{
public interface IWorkflowInterfaceValueType
{
Task<int> OperationWithParamsAsync(Func<Task<int>> requestResult);
Task OperationWithoutParamsAsync(Func<Task> requestResult);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -11,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Orleans.Activities.Test.Activities</RootNamespace>
<AssemblyName>Orleans.Activities.Test.Activities</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down Expand Up @@ -47,6 +47,8 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="IWorkflowCallbackInterfaceValueType.cs" />
<Compile Include="IWorkflowInterfaceValueType.cs" />
<Compile Include="IWorkflowInterface.cs" />
<Compile Include="IWorkflowCallbackInterface.cs" />
<Compile Include="NativeDelay.cs" />
Expand Down Expand Up @@ -200,6 +202,18 @@
<SubType>Designer</SubType>
</XamlAppDef>
</ItemGroup>
<ItemGroup>
<XamlAppDef Include="WorkflowCallbackInterfaceOperationValueType.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</XamlAppDef>
</ItemGroup>
<ItemGroup>
<XamlAppDef Include="WorkflowInterfaceOperationValueType.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</XamlAppDef>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<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"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:local="clr-namespace:Orleans.Activities.Test.Activities"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
xmlns:oa="clr-namespace:Orleans.Activities;assembly=Orleans.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Text</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>Microsoft.CSharp</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
<AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>Orleans.Activities</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>Orleans.Activities.Test.Activities</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<oa:WorkflowActivity x:TypeArguments="local:IWorkflowInterfaceValueType, local:IWorkflowCallbackInterfaceValueType" sap2010:WorkflowViewState.IdRef="WorkflowActivity`2_1">
<Parallel sap2010:WorkflowViewState.IdRef="Parallel_1">
<oa:SendRequestReceiveResponseScope sap2010:WorkflowViewState.IdRef="SendRequestReceiveResponseScope_2">
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_3">
<oa:SendRequest sap2010:WorkflowViewState.IdRef="SendRequest_1" OperationName="IWorkflowCallbackInterfaceValueType.OnOperationWithoutParamsAsync" />
<oa:ReceiveResponse sap2010:WorkflowViewState.IdRef="ReceiveResponse_1" />
</Sequence>
</oa:SendRequestReceiveResponseScope>
<oa:SendRequestReceiveResponseScope sap2010:WorkflowViewState.IdRef="SendRequestReceiveResponseScope_3">
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_4">
<Sequence.Variables>
<Variable x:TypeArguments="x:Int32" Name="responseResult" />
</Sequence.Variables>
<oa:SendRequest x:TypeArguments="x:Int32" sap2010:WorkflowViewState.IdRef="SendRequest`1_2" OperationName="IWorkflowCallbackInterfaceValueType.OnOperationWithParamsAsync" RequestParameter="42" />
<oa:ReceiveResponse x:TypeArguments="x:Int32" sap2010:WorkflowViewState.IdRef="ReceiveResponse`1_2">
<oa:ReceiveResponse.ResponseResult>
<OutArgument x:TypeArguments="x:Int32">
<mca:CSharpReference x:TypeArguments="x:Int32">responseResult</mca:CSharpReference>
</OutArgument>
</oa:ReceiveResponse.ResponseResult>
</oa:ReceiveResponse>
<WriteLine sap2010:WorkflowViewState.IdRef="WriteLine_2">
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String">responseResult.ToString()</mca:CSharpValue>
</InArgument>
</WriteLine>
</Sequence>
</oa:SendRequestReceiveResponseScope>
</Parallel>
<sads:DebugSymbol.Symbol>d4IBWjpcTG9jYWxcR2l0SHViXGxtYWd5YXJcT3JsZWFucy5BY3Rpdml0aWVzXHNyY1xPcmxlYW5zLkFjdGl2aXRpZXMuVGVzdC5BY3Rpdml0aWVzXFdvcmtmbG93Q2FsbGJhY2tJbnRlcmZhY2VPcGVyYXRpb25WYWx1ZVR5cGUueGFtbA4pA0cZAgEBKgVFEAIBAisHMCwCARIxB0QsAgEDLAkvFAIBGDIJQxQCAQktCy2fAQIBGi4LLlUCARk2CzbOAQIBEDcLPSACAQ0+C0IXAgEKNscBNssBAgEROhE6ZAIBDkAPQGYCAQs=</sads:DebugSymbol.Symbol>
</oa:WorkflowActivity>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="SendRequest_1" sap:VirtualizedContainerService.HintSize="304,63" />
<sap2010:ViewStateData Id="ReceiveResponse_1" sap:VirtualizedContainerService.HintSize="304,22" />
<sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="326,249">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="SendRequestReceiveResponseScope_2" sap:VirtualizedContainerService.HintSize="352,505" />
<sap2010:ViewStateData Id="SendRequest`1_2" sap:VirtualizedContainerService.HintSize="315,89" />
<sap2010:ViewStateData Id="ReceiveResponse`1_2" sap:VirtualizedContainerService.HintSize="315,62" />
<sap2010:ViewStateData Id="WriteLine_2" sap:VirtualizedContainerService.HintSize="315,62" />
<sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="337,417">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="SendRequestReceiveResponseScope_3" sap:VirtualizedContainerService.HintSize="363,505" />
<sap2010:ViewStateData Id="Parallel_1" sap:VirtualizedContainerService.HintSize="869,551" />
<sap2010:ViewStateData Id="WorkflowActivity`2_1" sap:VirtualizedContainerService.HintSize="895,639" />
<sap2010:ViewStateData Id="Orleans.Activities.Test.Activities.WorkflowCallbackInterfaceOperation_1" sap:VirtualizedContainerService.HintSize="935,719" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>
Loading

0 comments on commit f4cd47d

Please sign in to comment.