Exemplo n.º 1
0
#pragma warning restore CS8618 // Non-nullable field is uninitialized.
        public bool IsStartCurrentUser()
        {
            if (Workflow.HasExpired())
            {
                return(false);
            }

            if (Workflow.MainEntityStrategies.Count == 0)
            {
                return(false);
            }

            var act = Events.Values.Where(a => a.Type == WorkflowEventType.Start);

            return(act.Any(a =>
            {
                if (a.Lane.ActorsEval != null)
                {
                    var actors = a.Lane.ActorsEval.Algorithm.GetActors(null !, new WorkflowTransitionContext(null, null, null));

                    return actors.Any(a => WorkflowLogic.IsUserActor(UserEntity.Current, a));
                }

                return a.Lane.Actors.Any(a => WorkflowLogic.IsUserActor(UserEntity.Current, a));
            }));
        }
Exemplo n.º 2
0
 public static void Start(SchemaBuilder sb, Func <WorkflowConfigurationEmbedded> getConfiguration)
 {
     WorkflowLogic.Start(sb, getConfiguration);
     CaseActivityLogic.Start(sb);
     WorkflowEventTaskLogic.Start(sb);
 }