How to use action from another web application object - blueprism

I'm using Blueprism and I have to create a robot for a web application. So far I've had all of my subpages spied in one object, but now I must split that object into 5 different objects, each object for one subpage for example :
Now I got this : Web App - Object and I must split it into
Web App - Login Page
Web App - Main Page
Web App - Settings Page etc.
Everything worked when I had just one object but now it's not.
I spied elements again for my new objects in my application modeler.
Also I tried the "Sharable option" and of course published all of my pages.
For example my Web App - Main Page action cannot be used by my Settings Page. I can choose it from the list but then I get this error :
Internal : Failed To perform Step 1 In Navigate Stage 'Click' on page 'click' - Not Connected
What should I do and what should I write in application modeler when I'm asked for the URL of my start page? I've tried the main url for example web.com, my subpages url : web.com/main and also I tried to leave it blank.
Please help me to solve this problem

When splitting your functionality across multiple objects, it's important to note how Blue Prism handles connections ("attachments") to individual applications.
When a Business Object is leveraged to Launch a business application, the attachment to the application itself is (normally) handled in the background by Blue Prism. When another business object is created, the attachment isn't handed off to the secondary object(s). This is clearly laid out in the Blue Prism Object Design Guide document, section "4.2.4. Attaching":
An object must be attached to the application before it can be used
to automate it. When an object launches an application, it is
automatically attached to that application. Therefore, the ‘Basic
Actions’ object does not require an ‘Attach’ action. The remaining
objects that wish to work with an application that is already launch
must first attach to the application.
The solution to this object design paradigm is to include a non-published "Attach" function in each of the secondary objects that's called at the start of each of the secondary object's actions. From the aforementioned guide:
If an object attempts to attach to an application when it is already
attached, an error will result. Therefore, when building an ‘Attach’
action, it is best practice to first detect if the object is already
attached to the application. A typical ‘Attach’ action may look like
this
By using the approach above, every other action within the object can call the ‘Attach’ page as is its first stage to
ensure the action is ready to work with the application e.g.

If you are already launched the application then no need to keep url to rest of the Objects , just in application modeler u check the checkbox for application is already running, after that in each and every page attach the application and in the attach page keep the web page(all the navigating pages) names in the collection and passing it as a webtitle parameter to the attach stage
This works fine.

Related

Pass parameters from Web Application to CRM Case screen inside Unified Service Desk

I need to pass parameter from a web application that is opened inside a USD Session to CRM Case Screen that is also opened inside same USD Session.
Is there any possibility to do that? I know how to pass from CRM to web.. But I do not have rights to modify the web application. So how can I pass the values from web to crm?
I just need to put the value from web inside Unified Service Desk Data parameters from there I can have the values inside my CRM page.
Please let me know..
Create a new action call where the action is RunXrmCommand. The Hosted Control should be the page that is hosting your CRM Case screen. In the "Data" section of the action call, you can simply inject your USD context variable right into the javascript. The data section might look something like this for example:
function UpdateCaseFields() {
Xrm.Page.getAttribute("nwn_name").setValue("[[$Context.CaseName]+]");
}
If you are trying to go the other way, you have to fire an event from the javascript. This tutorial provides a good outline of it: https://neilparkhurst.com/2017/04/07/usd-execute-actions-from-javascript/

How to dynamically pass sql in query in Launch in context?

I need to have a button in custom Location app, upon clicking which will take me to workorder application list tab with all the workorders created on the assets of the particular location.
I am using launch in context.
I tried using WF, but the workorder is opening in main tab instead of List tab.
Work flow used
Interaction Node details
after routing, wotrack is opening like "http://hostname/maximo/ui/?event=loadapp&value=wotrack&additionalevent=changetab&additionaleventvalue=List&uniqueid=72&uisessionid=35&_tt=6e2h84jnc2qpnu9tohvo04qpdp"
how it is fetching workorder with unique id 72?
I think Launch in Context is the wrong tool. Launch in Context is used for launching the user from Maximo into some external website / application, using some data from Maximo to provide some context to that application.
Instead, it sounds to me like you should use a Workflow process with an Interaction Node. In the Interaction Node, you can specify the Application and tab to take the user to and the Relationship from the Main Object of the current app to use to find the record(s) that should be loaded in the destination app for the user.
I don't remember how to set up Launch in Context, but this web page on the URL parameters you can use should help on that part at least.
http://maximodev.blogspot.com/2012/04/maximo-urls.html
Specifically, the example using the SQL query is probably what you need, since you want to display the records (workorders) associated with the records (assets) associated with the record (location) you have. (The earlier outline of the article has the wrong URL values for the "Perform a query using a where clause" section, but the example near the bottom has the correct setup.)
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=sqlwhere&additionaleventvalue=status%20in%20('WAPPR')
I think if you give the Launch in Context the part of that URL after the hostname, it will try to load it as a page at the current, which would end up taking you to exactly where you want to be, regardless of the public hostname of the server.
maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=sqlwhere&additionaleventvalue=status%20in%20('WAPPR')

Blueprism web automation using excel

I want to fill a registration form by fetching data from excel using blueprism. In registration form the form redirects to another page after submission. But I am not able to do this flow in Process studio.
I Launched the Url and gave Loop start. The first data in excel is submitted but while fetching the second data from excel it throws an error message displaying
Application already launched
This is the Url "http://nancysara.wufoo.com/forms/z1c5ojru1qfibiq"
This error message happens when you are trying to use the Attach stage on an object that is already attached. You should have a logic in your object that checks whether attaching is necessary. Something like this:
This error occurs when trying to attach the Application or Browser that is being already attached to the Blueprism Object.
You can use "Read stage" to check the Application is connected or not.
Code looks like Code Block to check application connection
And read stage will be as below,
Read Block
You can create this code in new page and call this page before doing any interaction with the application

Communicating between IFRAME and an entity

I couldn't make a request to a remote server using JavaScript in the onload function due to access is denied insanity. So, just to make CRM obey, I set up an IFRAME and connect that to a HTML page running my JavaScript. Now, provided that I get some values inside the script (run in an IFRAME) how can I communicate them to a method in the holding parent?
Not quite sure how to explain it more detailed so please feel free to ask.
The access is denied is the Same Origin Policy. You're going to run into the same problem from the IFRAME unless you're serving the page or just the script src from the same server you're subsequently trying to make the AJAX request to.
Assuming you are doing the latter then you just need to make sure you have unchecked the "Restrict cross-frame scripting" option on the IFRAME you added to the CRM form. From the IFRAME you will now have access to your function that you've defined at global scope on the parent CRM form via window.parent.yourfunctionNameHere(xyz).
postMessage sounds like it might fit.
window.postMessage, when called, causes a MessageEvent to be dispatched at the target window when any pending script that must be executed completes (e.g. remaining event handlers if window.postMessage is called from an event handler, previously-set pending timeouts, etc.). The MessageEvent has the type message, a data property which is set to the string value of the first argument provided to window.postMessage, an origin property corresponding to the origin of the main document in the window calling window.postMessage at the time window.postMessage was called, and a source property which is the window from which window.postMessage is called.
To use window.postMessage, an event listener must be attached:
// Internet Explorer
window.attachEvent('onmessage',receiveMessage);
// Opera/Mozilla/Webkit
window.addEventListener("message", receiveMessage, false);
And a receiveMessage function must be declared:
function receiveMessage(event) {
// do something with event.data;
}
The off-site iframe must also send events properly via postMessage:
<script>window.parent.postMessage('foo','*')</script>
Any window may access this method on any other window, at any time, regardless of the location of the document in the window, to send it a message. Consequently, any event listener used to receive messages must first check the identity of the sender of the message, using the origin and possibly source properties. This cannot be understated: Failure to check the origin and possibly source properties enables cross-site scripting attacks.
Source: https://developer.mozilla.org/en/DOM/window.postMessage
Recently I had the joy of connecting to a web service and retrieve some data. When that’s been achieved, I found myself sitting on the said data not exactly knowing where to put it.
To make the long story short, I used the following source code.
parent.window.Xrm.Page.data.entity.attributes
.get("new_Konrad").setValue("Viltersten");
Notable is the fact that in order to communicate with the parent form, the HTML file (where my JavaScript resided), needed to be placed as a web resource within the CRM structure. By other words, just by pointing to an external “http://some.where/some.thing” we can consume a service but won’t be able to convey the obtained information up the CRM server, at least not when developing a solution for the on-line version.

How I can transform this scenario in GWT context

I have just started using GWT for web interface for our application.
My app has three different views for three different types of users. Each user has different type of interface (i.e. different navigation different menus etc).
There is one login page which will be index page of the application. The user shall enter the credentials and will be redirected to his/her section.
My problem is that how I can transform this scenario in GWT context. Weather I shall have four modules (i.e. one for login and other three for three type of users); weather there will be one module and I just have to change/load panels according to the user view type.
How shall I integrate these modules into one app? Weather I have to use JSP's to integrate these modules? Or these modules can be integrated by GWT to make a complete app.
Kindly help me in this regard.
Cheers
Raza
You could opt for having one module and via code splitting load the specific interface for the user.
Depending on your login procedure there a different ways to load the specific user interface. If the login is done in GWT code, so the login page is part of the application, then for example if the user logs in via a RPC call upon successful login a value is returned that indicates which user interface to start. Or if the login is done prior to loading the gwt page, for example if you use the standard webserver authentication, than the index page returned, which contains the gwt app, upon successfull login can already contain a variable generated in html which is than used to guide which user interface is loaded. These are just very generic ideas, but I hope you get the idea.
Regarding several modules. If you have 3 different modules, your build time also becomes 3 times as long, because GWT needs to generate 3 different applications.

Resources