Question
Accenture
CH
Last activity: 8 May 2017 8:29 EDT
Is there an OOTB action that allows accessing external web applications from Pega via a link?
A button in a section needs to open a new browser tab/window with a predefined link for an external application. The "policy number" of the current case needs to be inserted into the URL so that the policy currently being viewed in Pega is opened in the external system.
Does Pega have OOTB functionality to do this?
I do have an example from a previous application (see screenshot) that uses an action set with a "Run script" action. This is the script:
function OpenInP2000(P2000URL, PolicyID, Mode){
if(Mode == "Policy") Mode = "";
window.open(P2000URL + PolicyID + "/" + Mode);
}
In the interest of improved maintainability for the customer, I wonder if Pega offers something like this that wouldn't require the use of a script.
Thanks!
***Moderator Edit: Vidyaranjan | Updated Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Accenture
CH
I was able to solve this with a data transform as follows:
- Created a new property to store the URL: ".URLProperty" (not the actual name).
- On the Actions tab of the button that needs to open the URL, added a Refresh this section action to the existing Click event.
- Typed name of the new data transform into the data transform field ("FormURL") and hit the reticle icon to create and open it.
- Used Set on .URLProperty with a function call to Declare_EnvSettings.ServiceEndPoint(URLDomain) + .PolicyID
Works great. I had to use Refresh this section instead of simply adding a Data Transform action because the .URLProperty was not being set correctly. I don't know why.
Pegasystems Inc.
IN
Hi
i assume that you already know what will be the format of the URL so that it can open up the external application.
All you need to do is pass the policy ID in the URL.
To assist more on this, I would like to know how the URL will look like with Policy ID ? Can you please provide a sample URL ?
Accenture
CH
Hi.
Yes I have the format of the URL: https://X.com/randomstring/app/directaccess_flow?policy=Z
where X is just a string broken up by periods representing the address of the internal application and Z is simply an integer representing the policyID that needs to be used.
I'm currently trying to make sense of how to use the "Open URL in window" action set:
Open URL in window |
Using an activity that returns an HTML stream, opens a URL in a browser window. Action |
Hi.
Yes I have the format of the URL: https://X.com/randomstring/app/directaccess_flow?policy=Z
where X is just a string broken up by periods representing the address of the internal application and Z is simply an integer representing the policyID that needs to be used.
I'm currently trying to make sense of how to use the "Open URL in window" action set:
Open URL in window |
Using an activity that returns an HTML stream, opens a URL in a browser window. Action
|
Accenture
CH
I'm puzzled. See the screenshot. With that setup, the target application gives me the first line of this:
Policy PolicyID?policyid=00000012263010 is not found
I then removed the "PolicyID" at number 1 in the attached screenshot and get the following line:
Policy ?policyid=00000012263010 is not found
Then I removed the "policyid" from the PARAMETER column below the Alternate Domain URL field and get this somehow:
Policy 0000000000000? is not found
All I need is for the property .PolicyID to be inserted after the "=" of the URL in the Alternate Domain URL field.
Pegasystems Inc.
IN
Hi
You can take a look at OOTB Section : pxUIGalleryActionsLink section for details on how this can be configured.
Accenture
CH
Saw that but sadly it does not help because it only uses Alternate Domain URL simply and without multiple parameters for example. Sometimes I wish there were examples of all sorts of uses for various settings in Pega... I know of the UI Gallery, but it just scratches the surface.
Pegasystems Inc.
IN
Hi
Dont do the formation of the URL in the alternate domain field.
I would suggest you to take it to two steps
1. Use an activity to form your URL. In that activity you can refer the policy ID and use string fuction to concatenate and form a valid URL and store in a property
2. Then in the OpenURL In a window function , refer the property where you stored the URL . ( Use the down arrow key to refer the property )
Accenture
CH
That makes sense to me, though we are generally discouraged to use activities, even by PRPC itself. Could this perhaps also be done with a data transform?
Accepted Solution
Accenture
CH
I was able to solve this with a data transform as follows:
- Created a new property to store the URL: ".URLProperty" (not the actual name).
- On the Actions tab of the button that needs to open the URL, added a Refresh this section action to the existing Click event.
- Typed name of the new data transform into the data transform field ("FormURL") and hit the reticle icon to create and open it.
- Used Set on .URLProperty with a function call to Declare_EnvSettings.ServiceEndPoint(URLDomain) + .PolicyID
Works great. I had to use Refresh this section instead of simply adding a Data Transform action because the .URLProperty was not being set correctly. I don't know why.