コード例 #1
0
        public override IPolicyObject DeepCopy(bool readOnly, bool createNewId)
        {
            ActionMatrixCell readOnlyCopy = new ActionMatrixCell(this);
            bool readOnlyActionGroups = m_actionGroups.IsReadOnly || readOnly;
            readOnlyCopy.m_actionGroups = CollectionConverter.ConvertReadOnly<IActionConditionGroup, ActionConditionGroup>(m_actionGroups, readOnlyActionGroups, createNewId);
            readOnlyCopy.m_readOnly = readOnly;

            return readOnlyCopy;
        }
コード例 #2
0
        private void ReadActionMatrixCell(XmlNode actionMatrixCellNode, ActionMatrix actionMatrix, bool readOnly)
        {
            if ((null == actionMatrixCellNode) || (null == actionMatrix) || ("ActionMatrixCell" != actionMatrixCellNode.Name))
                return;

            string senderId = actionMatrixCellNode.Attributes.GetNamedItem("SourceRoutingItemCollectionId").InnerText;
            string recipientId = actionMatrixCellNode.Attributes.GetNamedItem("DestinationRoutingItemCollectionId").InnerText;
            bool actionMatrixCellReadOnly = PolicyUtilities.IsReadOnly(actionMatrixCellNode) || readOnly;

            PolicyCataloguesCache policyCataloguesCache = PolicyCataloguesCache.Instance();
            IRoutingItemCollection senders = policyCataloguesCache.LocationsCollections[new Guid(senderId)];
            IRoutingItemCollection recipients = policyCataloguesCache.LocationsCollections[new Guid(recipientId)];
            ActionMatrixCell actionMatrixCell = new ActionMatrixCell(senders, recipients);

            ReadActionMatrixConditions(actionMatrixCellNode, actionMatrixCell, actionMatrixCellReadOnly);

            actionMatrix[senderId, recipientId] = actionMatrixCell.DeepCopy(actionMatrixCellReadOnly) as IActionMatrixCell;
        }
コード例 #3
0
ファイル: RoutingHelper.cs プロジェクト: killbug2004/WSProf
        public static IActionMatrixCell ActionMatrixCellFactory(IRoutingItemCollection senderAddressCollection, IRoutingItemCollection recipientAddressCollection)
        {
            ActionMatrixCell amc = new ActionMatrixCell(senderAddressCollection, recipientAddressCollection);

            amc.ActionConditionGroups.Add(ActionConditionGroupFactory());

            return amc;
        }
コード例 #4
0
        public void TestAddActionGroupMultipleTimes()
        {
            PolicyCatalogue policyCatalogue;
            PolicyChannel channel;
            AddActionPostAddToChannel(out channel, out policyCatalogue);

            IActionMatrix actionMatrix = channel.Actions;
            Dictionary<KeyValuePair<Guid, Guid>, IActionMatrixCell>.Enumerator enumerator = actionMatrix.GetEnumerator();
            enumerator.MoveNext();
            KeyValuePair<KeyValuePair<Guid, Guid>, IActionMatrixCell> currentKeyValuePair = enumerator.Current;
            IPolicyObjectCollection<IActionConditionGroup> actionConditionGroups = currentKeyValuePair.Value.ActionConditionGroups;
            Assert.AreEqual(1, actionConditionGroups.Count);
            IActionConditionGroup actionConditionGroup = actionConditionGroups[0];
            Assert.IsNotNull(actionConditionGroup, "Expected a valid action condition group");
            ActionGroup actionGroup = actionConditionGroup.ActionGroup as ActionGroup;
            Assert.AreEqual(1, actionGroup.Actions.Count, "Expected one action");
            IAction action = actionConditionGroup.ActionGroup.Actions[0];
            Assert.IsNotNull(action, "Expected a valid action");

            // Lets add another cell
            IRoutingItemCollection senders = new RoutingItemCollection(new Guid("{1B5380C6-EFD3-445E-80EE-0AFAB63B870A}"), "Another sources");
            IRoutingItemCollection recipients = new RoutingItemCollection(new Guid("{AE069B6D-2CD9-4EB1-8128-A28421D35FB1}"), "Another destinations");
            ActionMatrixCell actionMatrixCell = new ActionMatrixCell(senders, recipients);

            ConditionGroup conditionGroup = new ConditionGroup(new Guid("{0E409581-5ED4-4563-933C-E6272F4521FD}"), new TranslateableLanguageItem("Another test condition group"), ConditionLogic.AND, false);

            ActionConditionGroup actionConditionGroup2 = new ActionConditionGroup(conditionGroup, actionGroup, false);

            actionMatrixCell.ActionConditionGroups.Add(actionConditionGroup2);

            actionMatrix[senders, recipients] = actionMatrixCell;

            Assert.AreEqual(1, policyCatalogue.Channels.Count, "Expected one channel");
            Assert.AreEqual(1, policyCatalogue.ActionGroups.Count, "Expected one action group");
            Assert.AreEqual(1, policyCatalogue.Actions.Count, "Expected one action");
            Assert.AreEqual(4, policyCatalogue.LocationsCollection.Count, "Expected two location groups");
            Assert.AreEqual(3, policyCatalogue.Locations.Count, "Expected three locations");
        }
コード例 #5
0
        private void AddActionPostAddToChannel(out PolicyChannel channel, out PolicyCatalogue policyCatalogue)
        {
            IPolicyLanguage language = new PolicyLanguage(new Guid("{E8B22533-98EB-4D00-BDE4-406DC3E1858B}"), "en");

            XMLPolicyCatalogueStore catalogueStore = XMLPolicyCatalogueStore.Instance;
            catalogueStore.Reset();
            policyCatalogue = new PolicyCatalogue(new Guid("{AB5E2A43-01FB-4AA6-98FC-8F74BB0621CA}"), language.Identifier, new TranslateableLanguageItem("{B5C31A66-1B39-4CA7-BF02-AF271B5864F7}"), catalogueStore);
            catalogueStore.AddPolicyCatalogue(policyCatalogue);

            PolicySetObserver policySetObserver = new PolicySetObserver(policyCatalogue);

            Assert.AreEqual(0, policyCatalogue.Channels.Count);
            Assert.AreEqual(0, policyCatalogue.ActionGroups.Count);
            Assert.AreEqual(0, policyCatalogue.Actions.Count);
            Assert.AreEqual(0, policyCatalogue.LocationsCollection.Count);
            Assert.AreEqual(0, policyCatalogue.Locations.Count);

            channel = new PolicyChannel(new Guid("{0FE26539-7AAD-46DC-8D5B-9651CC00B9E4}"), new TranslateableLanguageItem("Test channel"), ChannelType.SMTP);
            policySetObserver.AddObject(channel);

            IRoutingItemCollection senders = new RoutingItemCollection(new Guid("{441FDCBF-B606-4325-8CD5-E829AD5303B9}"), "Test sources");
            senders.Add(new RoutingItem(new Guid("{D41A47E2-CC13-46FF-BE83-829625792576}"), "James Brown", "*****@*****.**"));
            senders.Add(new RoutingItem(new Guid("{B031DFE9-54E7-482B-8955-18CFB8F06A40}"), "Nat King Cole", "*****@*****.**"));
            IRoutingItemCollection recipients = new RoutingItemCollection(new Guid("{29C44E5C-5405-409F-8513-A99AE246536F}"), "Test destinations");
            recipients.Add(new RoutingItem(new Guid("{9E26C6A2-ABE2-427D-9D78-5B8547ADA8D2}"), "Jet Li", "*****@*****.**"));
            ActionMatrix actionMatrix = new ActionMatrix();
            ActionMatrixCell actionMatrixCell = new ActionMatrixCell(senders, recipients);

            ConditionGroup conditionGroup = new ConditionGroup(new Guid("{9D065722-1106-4FC1-8D48-58733661B929}"), new TranslateableLanguageItem("Test condition group"), ConditionLogic.AND, false);
            ActionGroup actionGroup = new ActionGroup(new Guid("{E2A16C4D-E112-4249-92B9-612732117809}"), new TranslateableLanguageItem("Test action group"), 1);
            Action action = new Action(new Guid("{A5FAA63E-4F25-456F-92F9-9BB465C18F1F}"), "Test.dll", "Do.It", RunAt.Client, false, 1); //TODO JE
            ActionConditionGroup actionConditionGroup = new ActionConditionGroup(conditionGroup, actionGroup, false);

            actionMatrixCell.ActionConditionGroups.Add(actionConditionGroup);
            actionGroup.Actions.Add(action);

            actionMatrix[senders, recipients] = actionMatrixCell;

            channel.Actions = actionMatrix;
        }
コード例 #6
0
        public void TestAddActionPreAddToChannel()
        {
            IPolicyLanguage language = new PolicyLanguage(new Guid("{E8B22533-98EB-4D00-BDE4-406DC3E1858B}"), "en");

            XMLPolicyCatalogueStore catalogueStore = XMLPolicyCatalogueStore.Instance;
            catalogueStore.Reset();
            PolicyCatalogue policyCatalogue = new PolicyCatalogue(new Guid("{AB5E2A43-01FB-4AA6-98FC-8F74BB0621CA}"), language.Identifier, new TranslateableLanguageItem("{B5C31A66-1B39-4CA7-BF02-AF271B5864F7}"), catalogueStore);
            catalogueStore.AddPolicyCatalogue(policyCatalogue);

            PolicySetObserver policySetObserver = new PolicySetObserver(policyCatalogue);

            Assert.AreEqual(0, policyCatalogue.Channels.Count);
            Assert.AreEqual(0, policyCatalogue.ActionGroups.Count);
            Assert.AreEqual(0, policyCatalogue.Actions.Count);
            Assert.AreEqual(0, policyCatalogue.LocationsCollection.Count);
            Assert.AreEqual(0, policyCatalogue.Locations.Count);

            PolicyChannel channel = new PolicyChannel(new Guid("{0FE26539-7AAD-46DC-8D5B-9651CC00B9E4}"), new TranslateableLanguageItem("Test channel"), ChannelType.SMTP);
            policySetObserver.AddObject(channel);

            IRoutingItemCollection senders = new RoutingItemCollection(new Guid("{441FDCBF-B606-4325-8CD5-E829AD5303B9}"), "Test sources");
            IRoutingItemCollection recipients = new RoutingItemCollection(new Guid("{29C44E5C-5405-409F-8513-A99AE246536F}"), "Test destinations");
            ActionMatrix actionMatrix = new ActionMatrix();
            channel.Actions = actionMatrix;

            ActionMatrixCell actionMatrixCell = new ActionMatrixCell(senders, recipients);
            actionMatrix[senders, recipients] = actionMatrixCell;          

            ConditionGroup conditionGroup = new ConditionGroup(new Guid("{9D065722-1106-4FC1-8D48-58733661B929}"), new TranslateableLanguageItem("Test condition group"), ConditionLogic.AND, false);
            ActionGroup actionGroup = new ActionGroup(new Guid("{E2A16C4D-E112-4249-92B9-612732117809}"), new TranslateableLanguageItem("Test action group"), 1);
            Action action = new Action(new Guid("{A5FAA63E-4F25-456F-92F9-9BB465C18F1F}"), "Test.dll", "Do.It", RunAt.Client, false, 1); //TODO JE
            ActionConditionGroup actionConditionGroup = new ActionConditionGroup(conditionGroup, actionGroup, false);
            
            actionMatrixCell.ActionConditionGroups.Add(actionConditionGroup);
            actionGroup.Actions.Add(action);

            Assert.AreEqual(1, policyCatalogue.Channels.Count, "Expected one channel");
            Assert.AreEqual(1, policyCatalogue.ActionGroups.Count, "Expected one action group");
            Assert.AreEqual(1, policyCatalogue.Actions.Count, "Expected one action");
            Assert.AreEqual(2, policyCatalogue.LocationsCollection.Count, "Expected two location groups");
            Assert.AreEqual(0, policyCatalogue.Locations.Count, "Expected no locations");
        }
コード例 #7
0
ファイル: TestHelpers.cs プロジェクト: killbug2004/WSProf
        public static void BuildActionMatrix(IPolicy policy, ActionMatrix actionMatrix, ActionGroup actionGroup)
        {
            ConditionGroup conditionGroup = new ConditionGroup(new Guid("{661EDD6F-D750-493A-9932-E56C8C22E2CF}"), new TranslateableLanguageItem("Test condition group"), ConditionLogic.AND, false);
            policy.Conditions.Add(conditionGroup);

            PolicyCataloguesCache policyCataloguesCache = PolicyCataloguesCache.Instance();
            IRoutingItemCollection senders1 = policyCataloguesCache.LocationsCollections[new Guid("{A81631A6-6AA3-45F7-AADD-4853447E5BD6}")];
            IRoutingItemCollection senders2 = policyCataloguesCache.LocationsCollections[new Guid("{0DAACC5C-6167-42C7-AED0-55D1D9CC5096}")];
            IRoutingItemCollection recipients1 = policyCataloguesCache.LocationsCollections[new Guid("{FA13BE82-9EB1-407E-9DD5-8005F3E840E4}")];
            IRoutingItemCollection recipients2 = policyCataloguesCache.LocationsCollections[new Guid("{13A8EBE5-8B1E-4919-82E2-8A860DE4043E}")];

            ActionMatrixCell actionMatrixCell1 = new ActionMatrixCell(senders1, recipients1);
            actionMatrixCell1.AddActionCondition(conditionGroup, actionGroup, false);

            ActionMatrixCell actionMatrixCell2 = new ActionMatrixCell(senders1, recipients2);
            actionMatrixCell1.AddActionCondition(conditionGroup, actionGroup, false);

            actionMatrix[senders1, recipients1] = actionMatrixCell1;
            actionMatrix[senders1, recipients2] = actionMatrixCell2;

            ConditionGroup conditionGroup2 = new ConditionGroup(new Guid("{D64056E5-A19D-4B29-8F4A-A70337B42A19}"), new TranslateableLanguageItem("Test condition group 2"), ConditionLogic.AND, false);
            policy.Conditions.Add(conditionGroup2);
            ActionMatrixCell actionMatrixCell3 = new ActionMatrixCell(senders2, recipients2);
            actionMatrixCell3.AddActionCondition(conditionGroup2, actionGroup, false);

            ActionMatrixCell actionMatrixCell4 = new ActionMatrixCell(senders2, recipients1);
            actionMatrixCell4.AddActionCondition(conditionGroup2, actionGroup, false);

            actionMatrix[senders2, recipients2] = actionMatrixCell3;
            actionMatrix[senders2, recipients1] = actionMatrixCell4;
        }
コード例 #8
0
ファイル: TestHelpers.cs プロジェクト: killbug2004/WSProf
        public static void BuildActionMatrix(IPolicy policy, ActionMatrix actionMatrix, ActionGroup actionGroup, IRoutingItemCollections senders, IRoutingItemCollections recipients)
        {
            ConditionGroup conditionGroup = new ConditionGroup(new Guid("{661EDD6F-D750-493A-9932-E56C8C22E2CF}"), new TranslateableLanguageItem("Test condition group"), ConditionLogic.AND, false);
            policy.Conditions.Add(conditionGroup);

            // Just fill out each cell with the same condition group for now...
            int i = 0;
            foreach (IRoutingItemCollection senderCollection in senders)
            {
                foreach (IRoutingItemCollection recipientCollection in recipients)
                {
                    ActionMatrixCell cell = new ActionMatrixCell(senderCollection, recipientCollection);
                    cell.AddActionCondition(conditionGroup, actionGroup, false);
                    actionMatrix[senderCollection, recipientCollection] = cell;
                    i++;
                }
            }

        }
コード例 #9
0
ファイル: TestMatrixCell.cs プロジェクト: killbug2004/WSProf
        public void TestRemoveActionMatrixCell()
        {
            ActionMatrix actionMatrix = new ActionMatrix();

            RoutingItemCollection senders1 = new RoutingItemCollection(Guid.NewGuid(), "Senders1");
            RoutingItemCollection senders2 = new RoutingItemCollection(Guid.NewGuid(), "Senders2");

            RoutingItemCollection recipients1 = new RoutingItemCollection(Guid.NewGuid(), "Recipients1");
            RoutingItemCollection recipients2 = new RoutingItemCollection(Guid.NewGuid(), "Recipients2");

            Assert.AreEqual(0, actionMatrix.CellCount);
            
            actionMatrix[senders1, recipients1] = new ActionMatrixCell(senders1, recipients1);
            actionMatrix[senders1, recipients2] = new ActionMatrixCell(senders1, recipients2);
            actionMatrix[senders2, recipients2] = new ActionMatrixCell(senders2, recipients2);

            Assert.AreEqual(3, actionMatrix.CellCount);
            Assert.IsTrue(actionMatrix.HasCell(senders1, recipients1));
            Assert.IsTrue(actionMatrix.HasCell(senders1, recipients2));
            Assert.IsTrue(actionMatrix.HasCell(senders2, recipients2));

            actionMatrix.Remove(senders1, recipients2);

            Assert.AreEqual(2, actionMatrix.CellCount);
            Assert.IsTrue(actionMatrix.HasCell(senders1, recipients1));
            Assert.IsFalse(actionMatrix.HasCell(senders1, recipients2));
            Assert.IsTrue(actionMatrix.HasCell(senders2, recipients2));
        }
コード例 #10
0
 public ActionMatrixCell(ActionMatrixCell rhs) 
     : base(rhs)
 {
 }
コード例 #11
0
        public void TestWriteActionMatrixAttributes()
        {
            Guid languageId = new Guid("{CBEB31FA-7FE8-4E27-A01A-1D19AFCA604C}");
            PolicyLanguage language = new PolicyLanguage(languageId, "en");
            language[new Guid("{B067FF7F-2DA0-4AA1-A69F-DEFCD8B4CE90}")] = "Test condition";
            language[new Guid("{5570ABC5-188E-4893-92E4-6930802F9C05}")] = "Test policy";
            language[new Guid("{EBF8443B-4912-44F2-89BE-A0A055332D1B}")] = "This is my first custom property";
            language[new Guid("{8053E60C-EED7-464D-84EA-ECB51C291237}")] = "This is my second custom property";

            XmlPolicyLanguageStore languageStore = XmlPolicyLanguageStore.Instance;
            languageStore.AddLanguage(language);

            XMLPolicyCatalogueStore catalogueStore = XMLPolicyCatalogueStore.Instance;

            Guid catalogueGuid = new Guid("{751AEC6C-C164-4E6A-8581-A9ECCED87013}");
            PolicyCatalogue policyCatalogue = new PolicyCatalogue(catalogueGuid, languageId, catalogueStore);

            IDataItem dataItem = DataItem.CreateDataItem(new TranslateableLanguageItem("Test data item"), DataType.Long, 10);
            ObjectModel.IAction action = new ObjectModel.Action(new Guid("{26BCFA7E-3605-4EE7-ACC6-0AFB4D5EBB71}"), "CustomAction.dll", "Test.Clean", RunAt.Client, false, 1); //TODO JE
            action.DataElements.Add(new DataElement(new Guid("{EB56B397-954D-45C2-ADBA-263372A8B59F}"), new TranslateableLanguageItem("Test data item stored in data element"), new NonTranslateableLanguageItem(""), DataType.Long, dataItem));

            ActionGroup actionGroup = new ObjectModel.ActionGroup(new Guid("{987B7C8B-5ADD-4696-8456-DDE11D95CE0B}"), new TranslateableLanguageItem("Test action group"), 1);
            actionGroup.Actions.Add(action);

            ActionMatrix actionMatrix = new ObjectModel.ActionMatrix();

            ConditionGroup conditionGroup = new ConditionGroup(new Guid("{661EDD6F-D750-493A-9932-E56C8C22E2CF}"), new TranslateableLanguageItem("Profanity"), ConditionLogic.OR, false);
            IRoutingItemCollection senders = new RoutingItemCollection(new Guid("{79C512E8-3912-4709-B7D7-E91EFA3BD9FD}"), "Test sources");
            IRoutingItemCollection recipients = new RoutingItemCollection(new Guid("{FDC166E4-EBE5-4285-8F09-6A145D88C707}"), "Test destinations");

            ActionMatrixCell actionMatrixCell = new ObjectModel.ActionMatrixCell(senders, recipients);
            actionMatrixCell.AddActionCondition(conditionGroup, actionGroup, false);
            actionMatrix["{A81631A6-6AA3-45F7-AADD-4853447E5BD6}", "{D23F36C4-953F-4ED9-B1EB-8921BD50562B}"] = actionMatrixCell;
            actionMatrix["custom1"] = new TranslateableLanguageItem("{EBF8443B-4912-44F2-89BE-A0A055332D1B}");
            actionMatrix["custom2"] = new TranslateableLanguageItem("{8053E60C-EED7-464D-84EA-ECB51C291237}");

            IPolicyObjectCollection<IActionMatrix> actions = new PolicyObjectCollection<IActionMatrix>();
            actions.Add(actionMatrix);

            PolicyChannel channel = new PolicyChannel(new Guid("{390F589A-24B0-4DF0-B750-D47EDD1FF0BE}"), new TranslateableLanguageItem("Test channel"), ChannelType.SMTP);
            channel.Actions = actionMatrix;

            IPolicyObjectCollection<IPolicyObject> channels = new PolicyObjectCollection<IPolicyObject>();
            channels.Add(channel);

            XmlStore store = new XmlStore();

            ObjectModel.PolicySet policySet = new ObjectModel.PolicySet(new Guid("{8FC9EB93-C376-4E96-B22E-71FAA848393D}"), new TranslateableLanguageItem("{5570ABC5-188E-4893-92E4-6930802F9C05}"), store, policyCatalogue, false);
            P5Policy policy = new P5Policy(store, policySet, new Guid("{C0F6D4BB-CBF1-41FC-8A28-616D6FC1DC73}"), new TranslateableLanguageItem("Test policy"), PolicyStatus.Active);
            IPolicyStoreWriter writer = store.Writer;
            writer.WritePolicySet(policySet);
            writer.WritePolicy(policySet, policy);
            writer.WriteConditionGroup(policySet, policy, conditionGroup);
            writer.WriteChildCollection(policySet, policy, policy.Name.Value, channels);
            writer.Close();

            TestHelpers.CompareXml(m_testPath + "ExpectedWriteActionMatrixAttributes.xml", store.StoreXML);
        }
コード例 #12
0
ファイル: TestP5Policy.cs プロジェクト: killbug2004/WSProf
        private void BuildPolicy(IPolicy policy)
        {
            IConditionGroup conditionGroup = new ConditionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), ConditionLogic.AND, false);
            policy.Conditions.Add(conditionGroup);

            ICondition condition = new Condition(Guid.NewGuid(), "TestClass", new TranslateableLanguageItem(""), OperatorType.Equals);
            conditionGroup.Conditions.Add(condition);
            condition.Parent = conditionGroup;

            DataMethod dataMethod = new DataMethod("ThisIsATest");
            DataElement parameterDataElement = new DataElement(Guid.NewGuid(), new TranslateableLanguageItem(""), new NonTranslateableLanguageItem(""), DataType.String, "Lets go dynamo");
            dataMethod.Parameters.Add(new Parameter("somethingTerrible", parameterDataElement));
            IDataSource dataSource = new DataSource("ThisIsADodgyAssembly.dll", "ItWantsToTakeOverYourComputer", dataMethod);
            condition.DataLeft = new DataElement(Guid.NewGuid(), new TranslateableLanguageItem(""), new NonTranslateableLanguageItem(""), DataType.Object, dataSource);

            IDataItem dataRightDataItem = DataItem.CreateDataItem(new TranslateableLanguageItem(""), DataType.String, "This is a test");
            condition.DataRight = new DataElement(Guid.NewGuid(), new TranslateableLanguageItem(""), new NonTranslateableLanguageItem(""), DataType.String, dataRightDataItem);


            //Now build a channel
            PolicyChannel channel = new PolicyChannel(Guid.NewGuid(), new TranslateableLanguageItem(""), ChannelType.SMTP);
            policy.Channels.Add(channel);
            RoutingTable routingTable = new RoutingTable(Guid.NewGuid(), new TranslateableLanguageItem(""), ChannelType.SMTP);
            channel.Routing = routingTable;

            IRoutingItemCollection senders = new RoutingItemCollection(Guid.NewGuid(), "");
            senders.Add(new RoutingItem(Guid.NewGuid(), "James Brown", "*****@*****.**"));
            senders.Add(new RoutingItem(Guid.NewGuid(), "Nat King Cole", "*****@*****.**"));

            IRoutingItemCollection recipients = new RoutingItemCollection(Guid.NewGuid(), "");
            recipients.Add(new RoutingItem(Guid.NewGuid(), "Jet Li", "*****@*****.**"));

            routingTable.Sources.Add(senders);
            routingTable.Destinations.Add(recipients);

            ActionMatrix actionMatrix = new ActionMatrix(false);
            channel.Actions = actionMatrix;
            ActionMatrixCell actionMatrixCell = new ActionMatrixCell(senders, recipients);
            actionMatrix[senders, recipients] = actionMatrixCell;

            ConditionGroup conditionGroup2 = new ConditionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), ConditionLogic.AND, false);
            ActionGroup actionGroup = new ActionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), 1);
            IActionConditionGroup actionConditionGroup = new ActionConditionGroup(conditionGroup2, actionGroup, false);

            actionMatrixCell.ActionConditionGroups.Add(actionConditionGroup);

            Action action = new Action(Guid.NewGuid(), new TranslateableLanguageItem(""), "TestAction.dll", "Test.Action", RunAt.Client, false, 1); //TODO JE

            DataItem dataItem = DataItem.CreateDataItem(new TranslateableLanguageItem(""), DataType.String, "Not again, when will it ever end!");
            DataElement dataElement = new DataElement(Guid.NewGuid(), new TranslateableLanguageItem(""), new TranslateableLanguageItem(""), DataType.String, dataItem);
            action.DataElements.Add(dataElement);
            actionConditionGroup.ActionGroup.Actions.Add(action);

            //Setup the Action Exception
            ConditionGroup conditionGroup3 = new ConditionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), ConditionLogic.AND, false);
            ActionGroup actionGroup3 = new ActionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), 1);
            IActionConditionGroup actionConditionGroup3 = new ActionConditionGroup(conditionGroup3, actionGroup3, false);

            Action action3 = new Action(Guid.NewGuid(), new TranslateableLanguageItem(""), "TestAction.dll", "Test.Action", RunAt.Client, false, 1);
            actionConditionGroup3.ActionGroup.Actions.Add(action3);

            actionMatrix.ActionExceptionHandler.ActionConditionGroups.Add(actionConditionGroup3);

            //Setup the Offline Actions
            ConditionGroup conditionGroup4 = new ConditionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), ConditionLogic.AND, false);
            ActionGroup actionGroup4 = new ActionGroup(Guid.NewGuid(), new TranslateableLanguageItem(""), 1);
            IActionConditionGroup actionConditionGroup4 = new ActionConditionGroup(conditionGroup4, actionGroup4, false);

            Action action4 = new Action(Guid.NewGuid(), new TranslateableLanguageItem(""), "TestAction.dll", "Test.Action", RunAt.Client, false, 1);
            actionConditionGroup4.ActionGroup.Actions.Add(action4);

            actionMatrix.Offline.ActionConditionGroups.Add(actionConditionGroup4);
        }