Question


Bits In Glass
GB
Last activity: 20 Jul 2016 9:27 EDT
unable to open data instance error while using linkedin
Hi all,
i have tried the linkedin connection with pega. i used both pyConnectSocialNetwork,pyGetOAuthResource methods in it. when ran it on
a new page using data transform pyDefault.I can see a screen where it asks for authorization of linkedin.
the page referred to : https://pdn.pega.com/connecting-linkedincom-your-prpc-application .
Though authroized i cant find the clipboardpage OAuthResourceResponse .
how and when did this get created automatically from client side? coz on the activity i gave just OAuthPage.
please find the below screenshots :
1.
2.
3.
Hi all,
i have tried the linkedin connection with pega. i used both pyConnectSocialNetwork,pyGetOAuthResource methods in it. when ran it on
a new page using data transform pyDefault.I can see a screen where it asks for authorization of linkedin.
the page referred to : https://pdn.pega.com/connecting-linkedincom-your-prpc-application .
Though authroized i cant find the clipboardpage OAuthResourceResponse .
how and when did this get created automatically from client side? coz on the activity i gave just OAuthPage.
please find the below screenshots :
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Message was edited by: Vidyaranjan Av | Included Category
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Virtusa IT Consulting
AE
In step 1, have you defined the parameters for the activities you are calling as per the article?
This may seem silly but have you tried defining page as 'OAuthPage' in a camel case?
Did you check the SSL configuration (if it is used) is correct? ( you can check Pega logs to verify if there is any SSL related error)


Bits In Glass
GB
yes, i tried defining the page 'OAuthPage' but still facing the same issue.


Bits In Glass
GB
Please find the log message which is triggered while running it.
this message is put by me for recognizing it in log" "The step page:" + @getStepPageHandle(tools) + "contains the following properties:\n + @getXMLOfPage(myStepPage) ".
2016-06-04 11:29:10,617 [http-bio-8686-exec-3] [ STANDARD] [ ] [ NewWebAP:01.01.01] (NewWebAP_Work_FirstCase.Action) INFO localhost Admin@wenogood - The step page:DATA-ADMIN-SECURITY-OAUTH-CLIENTcontains the following properties:
+ @getXMLOfPage(myStepPage)
java.lang.Throwable
at com.pegarules.generated.activity.sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.step3_circum0(sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.java:322)
at com.pegarules.generated.activity.sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.perform(sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.java:113)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3505)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3238)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.step1_circum0(ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.java:175)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.perform(ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.java:69)
Please find the log message which is triggered while running it.
this message is put by me for recognizing it in log" "The step page:" + @getStepPageHandle(tools) + "contains the following properties:\n + @getXMLOfPage(myStepPage) ".
2016-06-04 11:29:10,617 [http-bio-8686-exec-3] [ STANDARD] [ ] [ NewWebAP:01.01.01] (NewWebAP_Work_FirstCase.Action) INFO localhost Admin@wenogood - The step page:DATA-ADMIN-SECURITY-OAUTH-CLIENTcontains the following properties:
+ @getXMLOfPage(myStepPage)
java.lang.Throwable
at com.pegarules.generated.activity.sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.step3_circum0(sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.java:322)
at com.pegarules.generated.activity.sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.perform(sh_action_getlinkedinfo_44ebc16fbb4bfb59bb8a1032162deb0d.java:113)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3505)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3238)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.step1_circum0(ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.java:175)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.perform(ra_action_pyrunrecordexecute_0f739eeb61a9046be9a6d286a73f151a.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3505)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10563)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.step11_circum0(ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.java:1009)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.perform(ra_action_pzrunrecordexecute_f73998920c112079b42c8cca0a4e44ad.java:245)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3505)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:461)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3358)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:385)
at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1270)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1008)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:841)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:331)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:852)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:240)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:574)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:374)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:272)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:121)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)


Bits In Glass
GB
any update on this?


Pegasystems Inc.
CA
Two issues here:
- You cannot call both pyConnectSocialNetwork and pyGetOAuthResource from the same activity. This should be performed in two steps. Call pyConnectSocialNetwork activity first. This will authenticate and authorize the user and obtain access token. This involves an asynchronous step. Unless this step is complete, you cannot call pyGetOAuthResource. The way you have written, pyGetOAuthResource would get called as soon as pyConnectSocialNetwork finishes its task, which is to launch LinkedIn popup challenging user for credentials.
- You didn't mention which version of Pega you are using. But from screenshot 7, this looks like a known issue that was fixed in 7.2. You can perform this local change.
In step 4 of Data-Admin-Security-OAuth-Client.pyGetRequestToken activity, after the following line:
String reqURI = tools.getRequestor().getRequestorPage().getString("pxReqURI");
Add these lines:
if ("".equals(reqURI)) {
reqURI = tools.getThread().getThreadPage().getString("pxReqURI");
}


Bits In Glass
GB
Hi there,
I am using Pega 7.1.9 as of now.
i'll try it and get back.


Bits In Glass
GB
Hi, please find the screenshots below:
i tried using a connect-wait for 10 sec.but still it is thoriwng me an error.
i did add the java code as you have stated.
what to do? is it not possible in the version of 7.1.9?


Pegasystems Inc.
CA
What is the error you are getting now? Can you do one quick test? Open pyConnectSocialNetwork activity and perform Actions -> Run. Provide the name of your OAuth client data instance. Let me know if you see any issues in this step.


Bits In Glass
GB
when i unit tested Actions->Run. the following error appeared on tracer.
Unable to open an instance using the given inputs: pxObjClass = "Data-Admin-Security-OAuth-Client-AccessToken", pyConsumerKey = "753mngttf9mge9", pyUserIdentifier = "Admin@wenogood" |


Pegasystems Inc.
CA
That means there is no access token for this OAuth client instance, which is OK. You should be redirected to linkedin login page. Don't you see that happening?


Bits In Glass
GB
yea. i can see that on pop-up the linkedin is asking for the "authroize app".but after authorizing,it redirects me to Tomcat.


Pegasystems Inc.
CA
Do you still have the Java code added to pyRequestToken activity? In the same Java step, can you log the value of callbackUrl and report back what the value is?