Deploy ExB Developer edition to Portal

1571
2
02-24-2023 04:26 AM
ShelbyZelonisRoberson
Occasional Contributor III

Hi - I'm trying to figure out if this workflow is even possible and if so how to do it.

My dilemma:  I created an ExB in AGOL that I need to migrate to an Enterprise 10.9.1 environment. 

I was careful to only use widgets that I knew were available in 10.9.1, but when I use AGO Assistant to copy the ExB from AGOL to Portal, I am getting an error that the ExB was created in a higher version and I must upgrade to open it. 

Problem is, you can't just upgrade the Portal ExB. My thought then was that I could use the Developer Edition to download the ExB built in AGOL, move it to the Enterprise environment, and deploy it there. This is where I'm getting stuck. I have the .zip file from my AGOL ExB. What's the best way to get this deployed as an ExB app in my Portal? Is the only choice to deploy it to a separate web server and maintain it separately from the Enterprise Portal? I was really hoping I could just get it as an ExB app in Portal. 

My other thought is I have to rebuild it from scratch in Enterprise to match what I have in AGOL. 

Ideas?? Thank you!! 

2 Replies
AllanHird
New Contributor II

I think the only way to do this would be to upgrade your ArcGIS Portal to the latest 11.1 and then try importing your ExB .zip file. 
As you stated, it is possibly easier to install the Developer Edition of Experience Builder and restore your AGOL ExB project .zip file in C:\ArcGISWebAppBuilder\server\apps\2\ (*) 

Note that any custom widgets that you may have coded may not transpose easily;  it may require reviewing the code.  The ExB team has changed some function names in V1.11

0 Kudos
fpolia21
New Contributor II

I would install Experience Builder Dev edition 1.11 https://developers.arcgis.com/experience-builder/ - note that V1.12 is coming up in mid July 2023.

1. install ExB dev edition in C:\ArcGISExperienceBuilder

2. run the npm start (client and server) in 2 CMD prompt

3. Link with your Portal or AGOL (make sure your laptop name is in the Portal >organisation>settings>security settings >trusted servers/ allowed origin/allow portal access)

 4. Create your first blank ExB v1.11 application,  drop a simple map and a text widget that says "TEST1234"

5. Save and publish

5.1 (optional) upload a thumbnail on your ExB 

6. go to C:\ArcGISExperienceBuilder\server\public\apps\0   .
You will see a config.json and a /resource/  and maybe /thumbnail/ folder
You will see an info.json 

7. copy/backup the whole lot (just in case)


Now get that downloaded .zip that you extracted from AGOL using ArcGISOnline Assistant 

fpolia21_1-1687246533765.png

 

  • make sure you get the 'Description' and the "Data" paragraphs (scroll down further)
  • save the description as agol_44b979c9ae09xxxxx2301a2e07e_description.txt
  • save the data as "config.json"
  • now copy this "config.json" into c:\arcgisExperienceBuiler\server\public\apps\0
    fpolia21_2-1687247193381.png
  • Copy the exact same file also in this location:   (don't know why - it exists in 2 locations) C:\ArcGISExperienceBuilder\server\public\apps\0\resources\config   

  • Now refresh your Experience Builder Dev edition :3001

    and VOILA! you have imported your AGOL Experience into your Local ExB Dev Edition.



    ---------------------------------------------
    Now if you want to inject that project into an Enterprise Portal (a portal installed on your own server), 
    you will need to do the same:

  • create a dummy ExB with your Portal
  • get the PortalItemID  (see URL when you edit)
  • find your portal install folder with all the itemIDs   \portal\content\items\ 
    There are thousands of sub-folder named the same as all the existing Portal itemIDs 
  • Open the folder that matches exactly the dummy ExB you just created (above) with your Enterprise Portal

  • in there there is another single file also called the same code as the ExBPortalItemID , a file with no extension:

    fpolia21_3-1687247706376.png

     

  • That is actually the same as a config.json ,  so copy your own config.json in there,  then rename your config.json to substitute that file 
  • Reload your Portal Experience Builder item : VOILA! you have surgically injected from the Dev Edition into your Enterprise Portal.


    What if I used Images in my AGOL ExB? How do I extract them?

  • Now you might need to fix / re-upload the images .  There is a \resources\images\widget_xxx which contains the jpeg or png attach to a specific widget,  I think you can just copy the whole lot but I don't know how you would extract the images from AGOL (AgoAssistant does not have an option to download child dependencies like png or jpeg used inside an ExB on AGOL) 
    You can open the "data" file again and search for .png and it will show locations such as 
    "imageParam": {
    "url": "${appResourceUrl}/images/widget_19/1670305389879.png",

    but you'd have to get them by running your existing ExB in AGOL and looking at Google Chrome Network packets (press F12, network tab) and look for the *.png and see where they come from.  Then copy the url, download the png and inject into your own Portal itemid folder under /resources/images/
      
    Let me know if you find an easier way 🙂