Skip to content

Commit 0da422d

Browse files
committed
WFE 4.0.8
1 parent 5495e3f commit 0da422d

98 files changed

Lines changed: 759 additions & 440 deletions

File tree

Some content is hidden

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

Samples/ASP.NET Core/MSSQL/DB/FillData.sql

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,15 @@ return doc.Sum > 100;]]></ActionCode>
240240
return;
241241
242242
var currentstate = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.CurrentState);
243-
243+
if(currentstate == null)
244+
{
245+
currentstate = processInstance.CurrentActivityName;
246+
}
244247
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.ExecutedActivityState);
245-
248+
if(nextState == null)
249+
{
250+
nextState = processInstance.ExecutedActivity.Name;
251+
}
246252
var command = WorkflowInit.Runtime.GetLocalizedCommandName(processInstance.ProcessId, processInstance.CurrentCommand);
247253
248254
var repository = WorkflowInit.DataServiceProvider.Get<IDocumentRepository>();
@@ -255,9 +261,15 @@ repository.WriteTransitionHistory(processInstance.ProcessId, currentstate, nextS
255261
return;
256262
257263
var currentstate = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.CurrentState);
258-
264+
if(currentstate == null)
265+
{
266+
currentstate = processInstance.CurrentActivityName;
267+
}
259268
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.ExecutedActivityState);
260-
269+
if(nextState == null)
270+
{
271+
nextState = processInstance.ExecutedActivity.Name;
272+
}
261273
var command = WorkflowInit.Runtime.GetLocalizedCommandName(processInstance.ProcessId, processInstance.CurrentCommand);
262274
263275
if(!string.IsNullOrEmpty(processInstance.ExecutedTimer))

Samples/ASP.NET Core/MSSQL/WF.Sample.Business/WF.Sample.Business.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="WorkflowEngine.NETCore-Core" Version="4.0.7" />
8+
<PackageReference Include="WorkflowEngine.NETCore-Core" Version="4.0.8" />
99
</ItemGroup>
1010

1111
<ItemGroup>

Samples/ASP.NET Core/MSSQL/WF.Sample.Business/Workflow/WorkflowInit.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ static void _runtime_ProcessStatusChanged(object sender, ProcessStatusChangedEve
8181
if (!e.IsSubprocess)
8282
{
8383
var nextState = e.ProcessInstance.CurrentState;
84-
var nextStateName = Runtime.GetLocalizedStateName(e.ProcessId, e.ProcessInstance.CurrentState);
84+
if(nextState == null)
85+
{
86+
nextState = e.ProcessInstance.CurrentActivityName;
87+
}
88+
var nextStateName = Runtime.GetLocalizedStateName(e.ProcessId, nextState);
8589

8690
var docRepository = DataServiceProvider.Get<IDocumentRepository>();
8791

Samples/ASP.NET Core/MSSQL/WF.Sample.MsSql/Entities/DocumentTransitionHistory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class DocumentTransitionHistory
1717
[Required(AllowEmptyStrings = true)]
1818
public string AllowedToEmployeeNames { get; set; }
1919

20-
[Column(TypeName = "date")]
20+
[Column(TypeName = "datetime")]
2121
public DateTime? TransitionTime { get; set; }
2222

2323
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]

Samples/ASP.NET Core/MSSQL/WF.Sample.MsSql/WF.Sample.MsSql.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageReference Include="AutoMapper" Version="8.0.0" />
1717
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" />
1818
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.2.0" />
19-
<PackageReference Include="WorkflowEngine.NETCore-ProviderForMSSQL" Version="4.0.7" />
19+
<PackageReference Include="WorkflowEngine.NETCore-ProviderForMSSQL" Version="4.0.8" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

Samples/ASP.NET Core/MSSQL/WF.Sample/Views/Document/Edit.cshtml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,25 @@
2121

2222
<div class="fields">
2323

24-
@if (Model.Commands.Count() > 0 || Model.AvailiableStates.Count > 0)
24+
@if (Model.Commands.Count() == 0 && Model.HistoryModel.Items != null)
2525
{
26-
if (Model.Commands.Count() == 0)
27-
{
28-
var nextStep = Model.HistoryModel.Items.FirstOrDefault(c => !c.TransitionTime.HasValue);
26+
var nextStep = Model.HistoryModel.Items.FirstOrDefault(c => !c.TransitionTime.HasValue);
2927

30-
if (nextStep != null)
31-
{
32-
<div class="field">
33-
<span style="color: #CC3300">
34-
For the current user commands are not available.<br />
35-
@Html.Raw(string.Format("In the field <b>\"Current employee\"</b>, select one of the users: <b>{0}</b>", nextStep.AllowedToEmployeeNames))
36-
</span>
37-
</div>
38-
}
28+
if (nextStep != null)
29+
{
30+
<div class="field">
31+
<span style="color: #CC3300">
32+
For the current user commands are not available.<br />
33+
@Html.Raw(string.Format("In the field <b>\"Current employee\"</b>, select one of the users: <b>{0}</b>", nextStep.AllowedToEmployeeNames))
34+
</span>
35+
</div>
3936
}
40-
else
37+
}
38+
39+
@if (Model.Commands.Count() > 0 || Model.AvailiableStates.Count > 0)
40+
{
41+
42+
if (Model.Commands.Count() > 0)
4143
{
4244
<div class="field">
4345
@foreach (var command in Model.Commands)
@@ -56,7 +58,6 @@
5658
}
5759
}
5860
</div>
59-
6061
}
6162

6263

Samples/ASP.NET Core/MSSQL/WF.Sample/wwwroot/js/workflowdesigner.min.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Samples/ASP.NET Core/MongoDB/WF.Sample.Business/WF.Sample.Business.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="WorkflowEngine.NETCore-Core" Version="4.0.7" />
8+
<PackageReference Include="WorkflowEngine.NETCore-Core" Version="4.0.8" />
99
</ItemGroup>
1010

1111
</Project>

Samples/ASP.NET Core/MongoDB/WF.Sample.Business/Workflow/WorkflowInit.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ static void _runtime_ProcessStatusChanged(object sender, ProcessStatusChangedEve
8181
if (!e.IsSubprocess)
8282
{
8383
var nextState = e.ProcessInstance.CurrentState;
84-
var nextStateName = Runtime.GetLocalizedStateName(e.ProcessId, e.ProcessInstance.CurrentState);
84+
if(nextState == null)
85+
{
86+
nextState = e.ProcessInstance.CurrentActivityName;
87+
}
88+
var nextStateName = Runtime.GetLocalizedStateName(e.ProcessId, nextState);
8589

8690
var docRepository = DataServiceProvider.Get<IDocumentRepository>();
8791

Samples/ASP.NET Core/MongoDB/WF.Sample.MongoDb/Implementation/PersistenceProviderContainer.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,15 @@ private void GenerateData()
347347
return;
348348
349349
var currentstate = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.CurrentState);
350-
350+
if(currentstate == null)
351+
{
352+
currentstate = processInstance.CurrentActivityName;
353+
}
351354
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.ExecutedActivityState);
352-
355+
if(nextState == null)
356+
{
357+
nextState = processInstance.ExecutedActivity.Name;
358+
}
353359
var command = WorkflowInit.Runtime.GetLocalizedCommandName(processInstance.ProcessId, processInstance.CurrentCommand);
354360
355361
var repository = WorkflowInit.DataServiceProvider.Get<IDocumentRepository>();
@@ -362,9 +368,15 @@ private void GenerateData()
362368
return;
363369
364370
var currentstate = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.CurrentState);
365-
371+
if(currentstate == null)
372+
{
373+
currentstate = processInstance.CurrentActivityName;
374+
}
366375
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.ExecutedActivityState);
367-
376+
if(nextState == null)
377+
{
378+
nextState = processInstance.ExecutedActivity.Name;
379+
}
368380
var command = WorkflowInit.Runtime.GetLocalizedCommandName(processInstance.ProcessId, processInstance.CurrentCommand);
369381
370382
if(!string.IsNullOrEmpty(processInstance.ExecutedTimer))

0 commit comments

Comments
 (0)