1. Pradevan Thakur
  2. PowerBuilder
  3. Tuesday, 13 February 2024 06:33 AM UTC

I have deployed my PB app on IIS server using Power Server 2022.
I need step-by-step guidance/demo/reference regarding conversion of non-visual business logic code written using Data windows & Power scripts into C# REST API, also how to call those API's from Power Script upon conversion. I am using SQL Anywhere 17.0 database.
I need to convert some section of complex business logic into C# API's to run it from Server-side.

Thanks,
PT

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 13 February 2024 14:54 PM UTC
  2. PowerBuilder
  3. # 1

You use the HTTPClient object to call the C# REST API from your PB app:

https://docs.appeon.com/pb2022r3/objects_and_controls/HTTPClient_object.html

You use the PowerScript Migrator and DataWindow Converter to convert your PowerScript code, embedded SQL, and DataWindows to C# REST APIs:

https://docs.appeon.com/powerscriptmigrator2022r3/Working_with_PowerScript_Migrator/index.html

https://docs.appeon.com/dwconverter2022r3/Working_with_DataWindow_Converter/index.html

Here is a sample app that shows how PB app calls C# REST APIs: 

https://github.com/Appeon/PowerBuilder-RestClient-Example

These Elevate conference sessions might also be useful for you: 

.NET DataStore Introduction: https://www.appeon.com/conference/elevate-2020/live?id=291

DataWindow Converter: https://www.appeon.com/conference/elevate-2020/live?id=262

PowerScript Migrator: https://www.appeon.com/conference/elevate-2020/live?id=255

NOTE: You will need to use PowerBuilder CloudPro Edition.

Comment
  1. Pradevan Thakur
  2. Wednesday, 14 February 2024 06:11 AM UTC
Do I have to publish the PB converted WebAPI in a separate website on Server-side IIS, as I can see PB calls to API has localhost url in demos.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 14 February 2024 13:39 PM UTC
This is just an example. If URL is localhost then the PB app and the IIS server need to be on same machine.

I don't mean this in bad way, but based on how basic questions you are asking I highly doubt you can successfully complete this whole project on your own. I would recommend involving a consulting partner: https://www.appeon.com/consultants/consulting-partners
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Tuesday, 13 February 2024 13:07 PM UTC
  2. PowerBuilder
  3. # 2

An alternative (or perhaps 1st step) to changing your code to C# , you could change your PB application to run from the command line and execute the PB process from a web api on a server.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 13 February 2024 13:16 PM UTC
  2. PowerBuilder
  3. # 3

Hi PT;             FYI: https://www.appeon.com/products/powerscript-migrator

Regards ... Chris 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.