예제 #1
0
        private void initializeCodeActivity_Initialize_ExecuteCode(object sender, EventArgs e)
        {
            EntityTokenLockedEntityToken entityToken = (EntityTokenLockedEntityToken)this.EntityToken;

            this.Bindings.Add("LockedByUsername", entityToken.LockedByUsername);
            this.Bindings.Add("IsSameUser", entityToken.LockedByUsername == UserValidationFacade.GetUsername());
        }
예제 #2
0
        private void finalizeCodeActivity_Finalize_ExecuteCode(object sender, EventArgs e)
        {
            EntityTokenLockedEntityToken entityToken = (EntityTokenLockedEntityToken)this.EntityToken;

            ActionLockingFacade.RemoveLock(entityToken.LockedEntityToken);

            this.CloseCurrentView();

            this.ExecuteAction(entityToken.LockedEntityToken, entityToken.LockedActionToken);
        }
예제 #3
0
        /// <exclude />
        public static FlowToken ExecuteEntityTokenLocked(ActionToken lockedActionToken, EntityToken lockedEntityToken, FlowControllerServicesContainer flowControllerServicesContainer)
        {
            EntityToken entityToken = new EntityTokenLockedEntityToken(
                    ActionLockingFacade.LockedBy(lockedEntityToken),
                    ActionTokenSerializer.Serialize(lockedActionToken),
                    EntityTokenSerializer.Serialize(lockedEntityToken)
                );

            WorkflowActionToken actionToken = new WorkflowActionToken(WorkflowFacade.GetWorkflowType("Composite.C1Console.Actions.Workflows.EntityTokenLockedWorkflow"));

            return Execute(entityToken, actionToken, flowControllerServicesContainer);
        }