Example #1
0
        public QueueItem AddQueueItem(NewQueueItem queueItem, Folder folder = null)
        {
            string output = JsonConvert.SerializeObject(queueItem);

            byte[] sentData = Encoding.UTF8.GetBytes(output);
            string response = _requestExecutor.SendRequestPostForOdata("Queues/UiPathODataSvc.AddQueueItem", sentData, folder);

            return(JsonConvert.DeserializeObject <QueueItem>(response));
        }
Example #2
0
        public QueueItem AddQueueItem(NewQueueItemData queueItemData, Folder folder = null)
        {
            NewQueueItem newQueueItem = new NewQueueItem
            {
                ItemData = queueItemData
            };

            return(AddQueueItem(newQueueItem, folder));
        }
        public void AddQueueItemTest()
        {
            Filter filter          = new Filter("Name", "TestQueue");
            var    queueDefinition = uiPath.TransactionManager.GetQueueDefinitions(filter).FirstOrDefault();

            if (queueDefinition != null)
            {
                NewQueueItem newQueueItem = new NewQueueItem
                {
                    ItemData = new NewQueueItemData
                    {
                        Name     = "TestQueue",
                        Priority = "High"
                    }
                };
                newQueueItem.ItemData.AddSpecificContent("Test1", "Test1");
                newQueueItem.ItemData.AddSpecificContent("Test2", 2);
                newQueueItem.ItemData.AddSpecificContent("Test3", false);
                var queueItem = uiPath.TransactionManager.AddQueueItem(newQueueItem);
                Assert.IsNotNull(queueItem);
            }
        }