Question

Unable to render the section using include jsp tag from HTML while accessing it from mobile app

Hi,

We are using PRPC V7.2.2 for our app and our app is running in mobile & desktop versions. We have a requirement to send the PDF in our application. For that, we are using the below steps and is working properly in Desktop version but we see some issues while rendering the sections in the PDF using mobile.

1) We have an activity where it is being called from a utility in the process flow

2) In the above activity, we have a property-set-HTML where we call the necessary section using the HTML rule instance

3) From the HTML rule instance, we are calling the include jsp tag to pull the necessary sections to be shown on the PDF

Eg: <pega:withPage name="pyWorkPage">

<pega:withEmbedded name=".EmbeddedPage1" >

</pega:withEmbedded ><pega:include name="SampleSection_PDF" type="Rule-HTML-Section"/>

<BR/>

</pega:withPage>

4) After rendering the section data, we store it in the param.Markup1

5) This param is used for generating the PDF logic using Call HTMLPDF

6) Sending email after above steps and the attached PDF

All the above steps are running fine in desktop but in mobile side we see the below data in Markup1 as below.

<div data-template-name='pxSection' data-template-instance-id='1517465638928000' CLASS='template-root-marker'><div id='1517465638941000' style='display:none'>

Here all the section data is rendered

Where as in Desktop version, the same Markup1 data is coming like below and the section is getting included properly.

< div data-ui-meta="{'type':'Section','ruleName':'SampleSection_PDF','insKey':'RULE-HTML-SECTION ABC-Data-IMP SampleSection_PDF #20171214T200602.506 GMT'}" class='sectionDivStyle' id='RULE_KEY' node_type='MAIN_RULE' node_name='SampleSection_PDF' data-node-id='SampleSection_PDF' version='1' objclass='Rule-HTML-Section' pyclassname='ABC-Data-IMP' readonly='false' expandRL='' uniqueID='SID1517293702717' >

I am unable to find the root cause for this issue from mobile side. Am I missing anything? Is there anything I need to work on the section and the used elements? Please help me.

Thanks,

Ravi Kumar.

***Edited by Moderator Marissa to update categories***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Group Tags

Correct Answer
February 17, 2018 - 11:48am

<p>The issue got resolved by adding 2 lines of code in the activity where we start preparing the PDF process.</p>

<p>Step1: Set the property:pzIsOfflineEnabled as false&nbsp;before PDF processing&nbsp;</p>

<p>Step2: Set the property:pzIsOfflineEnabled as true after&nbsp;PDF processing&nbsp;</p>

<p>Thanks</p>

<p>Ravi Kumar.</p>

Comments

Keep up to date on this post and subscribe to comments

Pega
February 2, 2018 - 1:39pm

Assuming you are using a hybrid mobile client, when you reference a section using pega:include, can you first confirm that your included section is packaged so that it is available to the client device on SYNC?

Thanks,

Sunny

February 2, 2018 - 8:49pm
Response to Sunny_GCS

Thank you Sunny. As far as my knowledge, we have our native app and I am not sure how to check the packaged stuff you mentioned. Can you pls elaborate more?

February 3, 2018 - 12:15am
Response to Ravi Kumar Pisupati

Hi Ravi,

To see the packaged data(eg: sections, DT etc). set the below log level setting 

com.pega.pegarules.session.internal.mgmt.autostreams.packaging.PackageRuntime  - ALL

Now when you log in to mobile, the complete packaged information, you should get in PegaRULES log file.

Regards,

Rachit

February 5, 2018 - 1:17am

HTML that you posted earlier 

  1. <div data-template-name='pxSection' data-template-instance-id='1517465638928000' CLASS='template-root-marker'><div id='1517465638941000' style='display:none'>

indicates section rendering failed and it is most probably due to broken/corrupt template tree due to non-auto generated code.

This looks like an offline-enabled application because UI templating is enabled for non-offline apps only in 7.3+ versions. It is possible to render the section correctly by forcing non-template UI but your use-case will not work  because there will be no work page context during packaging and even if it;s there you'll not have access to other sections you're trying to call. You'll need to switch to some client-side alternatives for this requirement. Or, you can send PDF as part of your flow which will happen the next time sync happens.

February 12, 2018 - 9:06pm
Response to Vikas@Multichannel

 

Hi Vikas,

I can't go with non Auto generated section option since I have many sections to modify them. I can't prepare and send the PDF later through an agent or whatever the alternative option. Why because the PDF data needs to be sent as a part of my Docusign API request. Is there any alternative way I can get this thing done?

Thanks

Ravi Kumar.

February 13, 2018 - 6:46pm
Response to Ravi Kumar Pisupati

 

Hello Vikas,

Any updates?

February 16, 2018 - 2:56pm

Created a SR for the issue and here is the SR-C13976

February 17, 2018 - 11:48am
Response to Ravi Kumar Pisupati

<p>The issue got resolved by adding 2 lines of code in the activity where we start preparing the PDF process.</p>

<p>Step1: Set the property:pzIsOfflineEnabled as false&nbsp;before PDF processing&nbsp;</p>

<p>Step2: Set the property:pzIsOfflineEnabled as true after&nbsp;PDF processing&nbsp;</p>

<p>Thanks</p>

<p>Ravi Kumar.</p>