Anypoint Studio 7.11.1 Shared Flows not showing in debugger - mulesoft

I am trying to debug shared flows within a mule app. (Mac Monetrey,Anypoint 7.11.1). I am unable to see debugger showing Flow Ref of shared flows as the call goes from mule app flows to shared flows, but instead it opens up shared flow xml files. The Share Flow Ref's does not change at all.
In the attached image Authentication_FR is a flow reference in the main mule app which call the shared flow (imported using import tag). The Flow Ref never changes (always showing Authentication_FR) but share flow xml gets opened as i step thru the debugger.
Thanks in advance for all the help.

Unfortunately you are facing a current product limitation. There is a submitted idea in order to implement this into future Anypoint Studio releases.
As a workaround you could remove the XML import tags and directly add the XML file(s) containing the shared flow(s) into the src/main/mule folder of the project you are debugging. Once you complete the debugging activities you will need to bring your project back to its original state.

Related

Content Management Api to POST media files from external source

I am looking for a solution in episerver to add media files from external sources into episerver.I am aware that episerver has recently released Episerver Content Management API to post contents within Episerver.Is it possible to use this for media files as well.As this is newly introduced in episerver, i cant find any references other than the documentation within epi which has more of CRUD operations on Content.Can someone please point out some reference links for me to get this started?
Any input is appreciated.
Regards,
The content management API is useful if you want to create a headless website that talks to Episerver via an API to get content.
Depending on what you want to use the media for will depend on the optimal approach. I assume you want the content editors to be able to pick these items from within the CMS? If so there are two main appraoches:
You could write a scheduled task using the content repository API to import the media into the Episerver media library
The other option is to create a content provider, so the media is available in the editor, read this to learn how to do it. This option is more fidley so I would go with option 1 if possible.
If you just want to render images on a web page, then call the API using AJAX. Job done!

How do I get my Selenium Grid Hub log

I have a selenium grid2 set up on an AWS instance, and I was wondering if there's a way I could view the logs on my local machine?
I understand I can visit: http://MyServerAddress/grid/console and view all of the nodes but I want the actual log.
Its a bit of a pain having to remote desktop to the server each time I want to view it.
I was thinking something like http://MyServerAddress/grid/log but alas, it doesnt seem to be an option.
There's nothing available out of the box. But you can build this on your own.
You would first need to enable logging for your Grid and have the logs dumped to a specific folder.
You would now need to build a custom Servlet and inject it into the servlet (See here for details on how to do it )
Assuming that your servlet is called "HubLogServlet", you should be able to access it via the link http://localhost:4444/grid/admin/HubLogServlet
You can refer to this LogServlet for a sample.

How to get file download complete status using selenium web driver c#

I am writing a automation script using selenium web driver for downloading multiple files one by one from a web site in Mozilla fire fox. I have downloaded first file successfully and next time I need to wait for download to complete. Can anybody help how to identify an ongoing download is completed using c# selenium web driver.? Since I am not getting the download complete status, I am unable to continue downloading next file.
Assuming you are testing file downloading in Firefox as you mentioned. Here is an approach to achieve what you want.
Open new window/tab in Firefox and navigate to 'about:downloads' directly.
i.e. driver.Navigate().GoToUrl("about:downloads");
You will get the list of downloads (i.e. already downloaded files and the file which is being downloaded currently.)
You will have to switch between your site tab and downloads tab.
Now on downloads tab, looking at HTML, you can easily find out in progress download using state or status attributes.
For example, for the first file in the list, if state="0" and/or status
contains the text 'remaining', it means downloading is in progress
So you can wait till state becomes state = 1 and/or status does not contain >the text 'remaining'
Refer the attached screen shot.
The explanation I gave here looks very high level, but I am sure this approach will work. It is simple too.
Let me know if you have any queries on this.

How to load a part of application before loading rest of the application in angularjs?

I could not think of a better title, Please suggest one.
I am planning to work on a large web application. It will take time to load the full application before application starts functioning.
Suppose its something like asana.com. If you have a link to the task and you open the link. It loads the application first and then shows the detail of the task.
Note: I have added another example in update 2
I want to do just the opposite. Suppose if I try to open the link directly. It should show me the tasks details first and then load the whole application in background.
What development strategy should I follow to implement such feature. Will angular be good for this? I have worked with angular for small projects and am capable of think in angular :)
I just wanted to be pointed in right direction.
Update 1:
I am using Apache2 PHP5 in backing as ReST API. I am thinking to change to GoLang http server. But that does not matter in this context :)
Update 2:
I have not yet started working on the application, but I know that its size is going to be big and its going to take time to load the application. This will be a javascript application, all the communication to web will be done mostly by API. APIs will be fast and it wont be slowing down the application. My main concern is the javascript library and the approach to the issue that I want to display the content of the page before the application is loaded and load the application in background.
As second example: https://chrome.google.com/webstore/detail/a-journey-through-middle/gjgkjeheegjnnmheaflhdocglkiegoni?utm_source=chrome-ntp-icon
If you open this link in chrome, it will load the application and then load the specific content in a popup. I want to load the content of the popup first and then load the application in background. How should I write my application to achieve that.
My suggestion (and I say this as I start to do similar vs. having proven it successful) would be to make some level of framework fairly static so that users get an almost instant response to the site loaded and then start the angular app with something like this
angular.bootstrap(document.getElementById("container"), ["app"])
Ref for the api - https://docs.angularjs.org/api/ng/function/angular.bootstrap
Ref for a demonstration of this - https://egghead.io/lessons/angularjs-angular-bootstrap-app-init
My expectation then is that you will be able to
Load your static elements quickly (which will just have placeholders for your content/material)
Access the data you want in the order you want to get it to present on the screen
Release any other part of the app you need to chrome it up/decorate or populate side items.

Current Thread is not in a single threaded apartment

I am working on a WPF application. I have used two “tasks” inside a button click event for parallel execution.
One task calls “Method1” which downloads files from a server. The second task calls “Method2”.
Method2 contains the following operations:
Download 2 files from a server
Parse & read the files' contents
Scrape a site to fetch site details
In the scraping operation, we are creating a WebBrowser object to load the site's contents.
The issue is that - while executing the button_click event - I am getting the following error:
How can I solve this issue? Any help would be appreciated.
Thanks,
Ranish
WebBrowser is a control and can't be used in cross threading. My advice is using HttpWebRequest, HttpWebResponse and HTML Agility Pack library to scrap HTML instead

Resources