Пример #1
0
        protected override void Execute(CodeActivityContext context)
        {
            Guid          documentId   = context.GetValue(this.inputDocumentId);
            DocumentState documentStep = context.GetValue(this.inputStep);
            string        currentUser  = context.GetValue(this.inputCurrentUser);
            bool          useManual    = context.GetValue(this.useManual);
            int           slaOffset    = context.GetValue(this.slaOffset);
            Expression <Func <EmplTable, bool> > predicate = context.GetValue(this.inputPredicate);
            bool executionStep = context.GetValue(this.executionStep);

            _service = DependencyResolver.Current.GetService <IWorkflowService>();
            WFUserFunctionResult userFunctionResult = _service.WFStaffStructure(documentId, predicate, currentUser);

            if (userFunctionResult.Skip == false && executionStep != true)
            {
                _service.CreateTrackerRecord(documentStep, documentId, this.DisplayName, userFunctionResult.Users, currentUser, this.Id, useManual, slaOffset, executionStep);
            }

            outputBookmark.Set(context, this.DisplayName.Replace("<step>", ""));
            outputSkipStep.Set(context, userFunctionResult.Skip);
            outputStep.Set(context, documentStep);
        }
Пример #2
0
        protected override void Execute(CodeActivityContext context)
        {
            int           level         = context.GetValue(this.inputLevel);
            Guid          documentId    = context.GetValue(this.inputDocumentId);
            DocumentState documentStep  = context.GetValue(this.inputStep);
            string        currentUser   = context.GetValue(this.inputCurrentUser);
            bool          useManual     = context.GetValue(this.useManual);
            int           slaOffset     = context.GetValue(this.slaOffset);
            string        profileName   = context.GetValue(this.profileName);
            bool          executionStep = context.GetValue(this.executionStep);

            _service = DependencyResolver.Current.GetService <IWorkflowService>();
            WFUserFunctionResult userFunctionResult = _service.WFMatchingUpManager(documentId, currentUser, level, profileName);

            if (userFunctionResult.Skip == false && executionStep != true)
            {
                _service.CreateTrackerRecord(documentStep, documentId, this.DisplayName, userFunctionResult.Users, currentUser, this.Id, useManual, slaOffset, executionStep);
            }

            outputBookmark.Set(context, this.DisplayName.Replace("<step>", ""));
            outputSkipStep.Set(context, userFunctionResult.Skip);
            outputStep.Set(context, documentStep);
        }