Published Solutions
-
[Basics] APS1 to APS2 migration
Original Publishing Date: 2020-01-22 Over the years I have developed an APS1 application, now I need to port it to APS2, but there are some questions on APS2 functionality: What's the analogue for Global Settings and how it should be implemented? Why do we need endpoint server? Is it an analogue for provisioning gateway host? Where is resource class 'Application'? What is this new resource type 'Application service reference'? In APS1 the hierarchy of the sevices was specified in APP-META.xml, how should it be done in APS2? In APS1 we used classes to get specific data from account/user/POA, how should it be done in APS2? How minimal APS2 external application should look like? What are the mandatory elements? What's the alternative to verification and resource scripts? Internal content
-
List of PA system DOM element IDs that should not be used in custom UI
Original Publishing Date: 2020-01-22 Below you can find a list of DOM element IDs used by POA. Using any of them in your application's custom UI may lead to unexpected behaviour. 'page', 'top', 'content', 'header', 'footer', 'main', 'pageLayout', 'search', 'search-form', 'navbar', 'login', 'frames-wrapper', 'frame-side', 'frame-main', 'frame-side-wrapper', 'frame-switcher', 'wrapper', 'side-panel', 'footer-wrapper', 'content-wrapper', 'classic-mode-navigation', 'top-wrapper', 'content-body', 'content-mode-navigation', 'divLeftFrameSwitcher', 'screenID', 'toolbar-content', 'secondary', 'screenTabs', 'tabSubItemsRow', 'key-code-input', 'chkProceed', 'fldset-mailInfo', 'fldset-admin_info', 'fldset-power' Internal content
-
[how-to] [Windows] Installing apstools
Original Publishing Date: 2020-01-22 Resolution apstools requires java, php and APS PHP Runtime. If you do not have Java already installed download and install JRE (for example 'Windows x64') Note: if you already have JDK you do not need to install JRE. Download and unpack PHP ( for example '5.7 VC11 x86 Non Thread Safe') Note: do not forget to add path to php.exe to PATH Download and unpack APS PHP Runtime Note: make sure APS PHP Runtime is accessible for PHP using include_path in php.ini Install apstools Internal content
-
Button from aps/Button or aps/ToolbarButton widget stays disabled after it is clicked
Original Publishing Date: 2020-01-22 Symptoms I am using the aps/Button (or aps/ToolbarButton) widget in my custom UI. After a button is clicked and the click handler completes the button stays in disabled state and shows a spinning circle. Resolution This is default behavior to prevent double submission by user. To enable the button back, you should call the cancel() method on it. Check the documentation for additional information and usage example: click here. Internal content
-
apsbuild fails with error 'One of APS Types in a package must implement http://aps-standard.org/types/core/application/1.0 type'
Original Publishing Date: 2020-01-22 Symptoms apsbuild command fails with the following error: schemas/globals.schema.gen:1: Error: No content to map due to end-of-input Error aps205: One of APS Types in a package must implement http://aps-standard.rg/types/core/application/1.0 type Validation complete: 2 Error(s), 0 Warning(s) Error: Failed to build package. Package is not valid. Cause aps-php-runtime tries to generate the schema files. After that apsbuid tries to find which schema implements core/application, if it does not find it the above error is printed. Resolution Most likely schema files were not generated. If they are empty it is needed to change 'display_errors = stderr' in php.ini and rerun apsbuid command for this package. The error will be printed into console: >apsbuild package Building package....... Info: Schema will be regenerated for service 'provider' from PHP code Error: Failed to build package. Failed to execute scripts/provider.php script: Fatal error: Class 'APS\ResourceBase' not found in C:\APS\APS2\package\scripts\provider.php on line21 Internal content
-
'Unauthorized request' and 'Can't determine Application ID from request' error when trying to contact endpoint using dojo/request/xhr
Original Publishing Date: 2020-01-22 Symptoms I've created a service with custom operation. When i'm trying to contact it from my custom UI using dojo/request/xhr I get this error: RequestError: Unable to load /aps/2/resources/81dc8c62-368f-4880-a740-a96bc9c7f14d/getList status: 403 Unauthorized request In poa.debug.log: Oct 2 12:16:33 sandbox : DBG [SYSTEM 1:1777:b0376b70 SAAS]: [APSC] Can't determine Application ID from request Oct 2 12:16:33 sandbox : ERR [SYSTEM 1:1777:b0376b70 SAAS]: [APSC] REST Error: GET /aps/2//resources/81dc8c62-368f-4880-a740-a96bc9c7f14d/getList code=403: Unauthorized request Cause Every request to controller should specify custom headers, including APS-Token and application instance ID. If either of these headers is missing in request headers APS controller will refuse to process such request. dojo/request/xhr is a method from dojo library that does not provide any additional headers. Resolution Use aps/xhr instead. It sends a request using XMLHttpRequest with the given URL and options. It is the same as dojo/request/xhr except it adds custom APS headers to HTTP requests and sets the 'handleAs' parameter to 'JSON'. Internal content
-
aps-runtime-error: "code":404,"error":"Rest::RestException","message":"No defaults"
Original Publishing Date: 2020-01-22 Symptoms I see the following error in Apache log on the endpoint host: aps-runtime-error: {"code":404,"error":"Rest::RestException","message":"No defaults."} What does it mean? Can it be ignored? Cause The error is related to the special Get resource defaults operation The _getDefault() is the function that gets default values of a resource properties. It is called before provision. Must return an array of (proparty => value) pairs. Example: array(“prop1” => “value1”, “prop2” => “value2”) Please refer to Base Interfaces Methods Implementation If there are no defaults provided it returns 404, 'No defaults.'. Please ignore the error. Internal content
-
How to configure APS resource upgrades in PA?
Original Publishing Date: 2020-01-22 My APS package has a measurable resource: diskspace Is it possible to give the end-user ability to upgrade it in packs? For example 50GB, 100GB, 150GB etc. Resolution [POA] Create Resource Types: based on 'Application' Resource Class based on 'Application Resource (KB)' Resource Class if your application has any other resources create them as well [POA] Create Service Template with Resource Types created on previous step. [PBA] Create new Resource Category ( Product Director > Resource Manager > Resource Categories), 'Webshop Display Type' should be 'Radio Button'. [PBA] Create a Composite Resource (Product Director > Resource Manager > Resource) for each choice (50GB/100GB/150GB): Name will be displayed to user during switch, choose something like 'APPLICATION_NAME Diskspace 50GB' Resource category created on step 3 Unit of Measure - GB Type - Composite Resource Then navigate to 'Included Resources' in created composite resource > 'Add New Included Resource', find the resource you created on step 1 (based on 'Application Resource (KB)' Resource Class), specify amount (for example 50). Repeat the steps to create Composite Resources for 100GB and 150GB [PBA] Create Service Plan Add Resource Rates for composite resources created on step 4, check "Show in CP" and "Show in Store" for all resource rates. Since the resources packs can either be enabled or disabled the following limits should be setup: Max units: 1 Min units: 0 Included units: 0 for all resources other than default. So if a 100GB pack should be provisioned when the subscription is provisioned 'included units' of this resource rate should be set to 1, the rest should be set to 0. To test the setup create an order for a customer, install application, navigate to Account > Buy Additional Resources, you should see a list of choices like this: Internal content Link on internal Article
-
How to install APS Connector with Vendor Contract ID support to Odin Automation < 7.2
Original Publishing Date: 2020-01-22 Symptoms After importing an application, the "APS application %application_name%, id %id%: Importing APS package %application_package_name%" task fails with the following message: Internal error: APSC: Package metafile URI of type `http://odin.com/aps/types/oa/vendor-contract/1.0` is not found.. Cause The APS type http://odin.com/aps/types/oa/vendor-contract/1.0 is missing in the OA installation. Resolution Register the http://odin.com/aps/types/oa/vendor-contract/1.0 APS type by importing the apsv2_abstract_types-7.2.0-1931.app.zip application. For this purpose, do the following: Download the apsv2_abstract_types-7.2.0-1931.app.zip application package. Import the downloaded application to your OA installation: a. Log in to your OA control panel as provider's staff member. b. Go to Services > Applications. c. Click Import Package and choose to import a local file. d. Click Choose File and locate the application package downloaded in step 1. e. Click Submit. Internal content
-
Cannot start ploop container: Failed to mount image: e2fsck failed
Original Publishing Date: 2020-01-22 Symptoms Container cannot be started with the following error: [root@vz ~]# vzctl start 101 Mount image: /vz/private/101/root.hdd /dev/ploop30233p1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) Failed to mount image /vz/private/101/root.hdd: e2fsck failed (exit code 4) Failed to mount image: e2fsck failed (exit code 4) [152] Cause Container's mount fails due to file system errors inside the ploop virtual disk. Resolution Run the check disk as per the instructions from the following article 115683 How to perform fsck on a ploop container Internal content