signumsoftware / framework

Open Source framework for writing data-centric applications using the latest versions of .Net Core, C# (not-nullable), ASP.NET Web API, Typescript (strict), React, D3 and Sql Server or PostgreeSQL
https://www.signumsoftware.com/en/Framework
MIT License
221 stars 84 forks source link

add RunRepeatedly/DecisionOptionName to WorkflowEventEntity #584

Closed MehdyKarimpour closed 1 year ago

MehdyKarimpour commented 1 year ago

Hi Olmo,

First requirement is the need to send Email/SMS or do something in parallel while a case activity is in pending state. First idea is using Non-interrupting(Fork) boundary timers, but actually they run only once but we need to run them repeatedly while the case activity is pending. So I have added a new property bool RunRepeatedly to WorkflowEventEntity with default false for full backward compatibility and consider it on CaseActivityTask.Timeout and CaseActivityOperation.Timer. We need to use LastExecution when RunRepeatedly is true and the rest changes. Also adapt the UI that it makes sense only for Non-interrupting(Fork) timers.

Second requirement is to simulate doing Accept/Decline/... (or other configurable Decision Task Options) automatically. Now it is possible to do it by a Interrupting-timer for Tasks (Next) but not for DecisionTasks (Accept/Decline/...). Also it is not possible to do multiple Accept/Decline/... from Inbox. The idea is to use Interrupting-timer for it. So, I have added another new property called string? DecisionOptionName to WorkflowEventEntity and consider it on CaseActivityLogic.ExecuteBoundaryTimer(). Also adapt the UI that it makes sense only for Interrupting timers. Because it is rare to use, I didn`t use select component to see current values, but instead, I have added some validations for it.

Hopefully this comments will useful, thanks.

olmobrutall commented 1 year ago

Thanks for the changes!

MehdyKarimpour commented 1 year ago

you're welcome 👍