Question
Tata Consultancy Services
IN
Last activity: 5 Apr 2019 6:30 EDT
How to call pega.api.ui.actions.launchHarness(options); from outside pega?
Hi,
I am able to launch harness using pega.api.ui.actions.launchHarness(options); inside pega using custom section.
Now, I want to launch harness from out side pega.
eg: I have a js file outside pega which is going to use Javascript API to launch harness using pega.api.ui.actions.launchHarness(options). Is it possible ?
Can someone please give me exact syntax for the same?And what all things needs to be created inside pega and outside pega?
Regards,
Deepali
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi ,
Outside the pega if you are calling pega related API then the pega object will not be avilable.
Once the pega object is avilable you can call the related API . You can check by writing pega in the developer console.
Tata Consultancy Services
IN
Hi Sahu,
I am just doing it with simple html file created on local machine. Say index.html and trying to launch Harness which is created in Pega Personal Edition.
Inside script I am having this code to launchHarness
<script>
function LaunchHarnessFromJavascript() {
var params = {harness:"MyHarness",
harnessClass:"MyOrg-ReactDem-Work",
displayMode:pega.api.ui.constants.POP_UP_WINDOW,
tabName: "TAB1",
contextPage: "pyWorkPage",
windowName: "MyWindowTest",
windowWidth: "500",
windowHeight: "500"
};
pega.api.ui.actions.launchHarness(params);
}
</html>
But I am not sure what other code will be required inside HTML file to actually launch the harness.
Can you please elaborate more on this?
Regards,
Deepali
Pegasystems Inc.
IN
HI Deepali,
Your usecase more closely related with the Pega Mashup.
As you are having index.html which could be treated as the 3rd party application and you want to embed the pega code/functionality in that.
Tha is possible via pega mashup.
Pegasystems Inc.
IN
Please find the below links for the implemetation of mashup.
https://community.pega.com/knowledgebase/articles/tutorial-creating-mashup-pega-web-mashup
https://community.pega.com/knowledgebase/capabilities/mobility/mashup-sdk/web-mashup
If you still feel difficulty let me know.
Tata Consultancy Services
IN
Hi Sahu,
Thanks for reply.
If we use Pega Mashup and try to include JavaScript API call inside mashup will it work?
If not can you please share with me details of how to call Javascript API from outside Pega?
Regards,
Deepali
Pegasystems Inc.
IN
Hi,
In the mashup directly you can have the showharness functionlity (show harness) which means as soon as you will load the mashup that harness will be shown.
Tata Consultancy Services
IN
Hi,
My query is for all Javascript API for control actions. Not only for launchHarness.
If we want to call any other JavaScript API like runDataTransform/getSection/getDataPage will it be possible using mashup? If not how we can achieve this outside pega?
Regards,
Deepali
Tata Consultancy Services
IN
Hi Sahu,
Can you please confirm about JavaScript API call outside pega?
Regards,
Deepali
-
Anders Sundqvist