Árvore de páginas

Contents

Objective

The goal of this guide is to briefly display the settings of Application ERP and Container ERP widgets and their technical details.

Introduction

Application ERP and Container ERP widgets allow ERP screens that use HTML Framework technology to be displayed within the fluig. The first is used for applications (screens) and the second for ERP widgets.

Operation and settings

The settings and operation of both is simple, just fill in the ERP context to enable data loading.

ERP application

In this widget, you can configure the context in page editing and enter the standard value. If there are parameters in the rest of the URL in this format: /portal/p/[Código de Empresa]/[Página]#/[Contexto do ERP]/[Restante da Página]/ i.e.: /portal/p/empresa/erpapp#/erp1/path/to/application, this value will suppress the settings.

ERP container

In this widget, only the URL is configured in page editing, that allows you to put several widgets on a page and set up a panel with relevant information, or in a community where these data may be relevant.


To work properly, the framework has to be provided along with the ERP context. Here, as an example, we will use the /erp1 value and this is the structure:

Folder hierarchyDescription

/*

Fluig context.
/erp1 < - erp1 contextERP context.

       /totvs-html-framework


               /js

Javascript dependencies.
                   /setup/config-app.jsBASE_URL settings used as reference by RequireJS.
               /fluigFluig setup files.
                       /main.jsLoading RequireJS and defining dependencies.
/erp2 < - erp2 contextERP context.

       /totvs-html-framework


             /...

Same structure standard.


The framework developed is based on RequireJs to managing Javascript dependencies, so to avoid conflict with fluig's own dependencies, these must be loaded only at the end of the page loading.

After settings and RequireJs, proceed loading Angular dependencies and finally the ERP contents.

The following call performs the injection of the component in a pre-existing div in the page.

login.checkLogin( html , error, url, angular, that.widgetLink)

After injection of the component in the page, all screen behaviors are the responsibility of the ERP.

If there is any problem with loading, a message will appear on the screen and the browser log will report more details. In addition, you can use the tools provided by the browser to identify unavailable files and possible slowness issues.


Reverse proxy

As fluig and ERP are separate servers, each operates in a separate domain, which hurts the browser Same-Origin policy. A reverse proxy must be configured to avoid this situation, i.e. Apache Server.

The mappings should be made so that the fluig stay in the domain root and the ERP stands in a context below, as shown in the folder hierarchy table.


The proxy setting is the responsibility of the ERPs, these are the mappings informed:

ProductContextTarget
Fluig/<fluig HOST>:<FLUIG PORT>
Logix

Has not been set

<LOGIX HOST>: <LOGIX PORT>
Datasul

/dts*

/josso

< DATASUL HOST>: < DATASUL PORT >
RM/rm<RM HOST>: <RM PORT>



  • Sem rótulos