Árvore de páginas

Você está vendo a versão antiga da página. Ver a versão atual.

Comparar com o atual Ver Histórico da Página

« Anterior Versão 2 Atual »

6.1. Objective

Allow the possibility of opening Flex , Metadata or Progress screens in Datasul through a link or button on the form, in HTML forms associated to processes in Fluig. These screens will be opened through a URL to be called in a Javascript function in the form.

6.2. Programming Guide

In an HTML form in Fluig, with a link or button to open a screen in Datasul, an HTTP call must be used to open a new browser window containing the form to be opened.

For Flex or Metadata forms, the "External User Authentication" technique is used. For Progress programs, use the "ABL External Call". Below are a few examples of URLs that allow the opening of each of the types.

  • URL for direct access to a Flex Portlet:

http://server:port/josso/signon/externalUserAuthentication.do?josso_cmd=external-login&type=frwk&module=fnd&program=datasul-calculatorportlet-flex&viewtype=portlet&userid=super&password=c3N6a0AxMjM=


  • URL to access Metadata form:

http:// server:port /josso/signon/externalUserAuthentication.do?josso_cmd=external-login&type=md&program=ems5.emsuni.CRUDUnidOrgan&viewtype=view&userid=super&password=c3N6a0AxMjM=

 

  • URL to access Progress programs:

http:// server:port /abl-external-call/execute?program=cd0704.w&module=cdp&user=super&password=c3N6a0AxMjM=

 

Base URL for Flex and Metadata: http://server:port/josso/signon/externalUserAuthentication.do?

Base URL for Progress: http:// server: port /abl-external-call/execute?

 

Flex and Metadata parameters:

    • josso_cmd: Command to be executed by JOSSO, in case of external login.

    • userid: Username.

    • password: User password. It must be sent using Base64 encode.

    • type: Program type to be opened, frwk or md; md is for metadata type and frwk is for framework. It is necessary to inform so that josso knows if you are going to use the MODULE parameter or the PROGRAM parameter.

    • program: Program to be accessed, put the full metadata program path, such as: ems5.emsuni.CRUDUnidOrgan.

    • module: Module to be accessed, only for flex programs.

    • viewtype: Type of window that will open, which may be:

      • view

      • portlet

      • window

 

Progress parameter:

    • program: Name of Progress program.

    • Module: name of the module.

    • userid: Username.

    • password: User password. It must be sent using Base64 encode.

 

In Fluig side, in order for a form to call to a screen on Datasul, we can use the following example:

 

    • Assuming that in a Fluig form there is a button to call the Progress program as follows:

            <input value="Programa" onClick="callProgress()" type="button">

When the button is clicked, the callProgress() function will be called, and it can have the following code:

						
function callProgress () {
               var url = “http://cassino:8180/abl-external-call/” +
                         “execute?program=cd0704.w&module=cdp&” +
                         “user=super&password=c3N6a0AxMjM=";
               window.open(url);
           } 

 

  • A similar function to call a metadata form:

 

           function callMetadados () {
               var url = “http://:port/josso/signon/" +
                         "externalUserAuthentication.do?josso_cmd=external-login&" + 
                         "type=md&program=ems5.emsuni.CRUDUnidOrgan&viewtype=view&" +
                         "userid=super&password=c3N6a0AxMjM=";
               window.open(url, “Unidade Organizacional”, 800, "width=800,height=600");
           }

In the case of Metadata form, optionally, it can be customized to return information to the Fluig form, using the command CALL-BACK-WINDOW-OPENER(). Refer to:  Calls to Datasul Zooms through Forms in Fluig: ABLScript function for FreeForm Forms4.

 


  • Sem rótulos