Development > Safe X3 WAS > SAFE X3 link > Web action 

SEEWARNING Before creating your site, it is advised to read the documentation:Before beginning.


An EXTEND User action triggers either an action carried out directly by the XTEND server, or a call to a X3 Web service being either a sub-program or an action associated with an X3 object.
The action uses X3 web services when it is associated with an interface.
An action is used to describe the mapping (correspondence) between XTEND entities/fields and groups/setups of an interface upon receipt (valuation of call setups) and issue (process of sent values).
The action is associated with a dynamic link tokeninserted in the HTML page in a button or anchor tag.
The action is triggered by the user's click.

Predefined actions

Detail of predefined actions:

Code

Setups

Dynamic link

Description

ABLKFIRSTPAGE

No

ADLKFIRSTPAGE

Displays the first page of a block
Syntax MyBlock.MyDynamicLink

ABLKNEXTPAGE

No

ADLKNEXTPAGE

Used to display the next page of a block

ABLKPREVPAGE

No

ADLKPREVPAGE

Used to display the previous page of a block

ABLKLASTPAGE

No

ADLKLASTPAGE  

Used to display the last page of a block

ABLKRESTOREMAINCTX

No

To be created

Return to a list without loosing the pagination
Create a dynamic link with the page that contains a block as target page

ABLKSELECT

No

ADLKSELECT

Used to select the line of a block
MyBlock.MyField displays the value of MyField for the selected line

ABLKUNSELECT

No

ADLKUNSELECT

Used to deselect the selected line of a block

ARESTOREFORM

No

ADLKRESTOREFORM

Restores an HTML form with the initial values
Does not take into account the HTML parameter xrc

ARESTORESESSION

No

ADLKRESTORESESSION

Used in the reconnection page (see site record)
Displays the last page opened before closing the browser

ASESSLOGIN  

Yes

ADLKLOGIN

User login
User code (AUSERCODE) and password (APWD) in setup
The interface and the setups mapping remain to be done

ASESSLOGOUT

No

ADLKLOGOUT

Used to logout the user

ASESSSWITCHCOOKIES

No

ADLKSWITCHCOOKIES

Used to exchange the modes 'without cookies' and 'with cookies'
Use the conditioned block ADISPNOCOOKIES
to display the session status with/without cookies

ASESSSWITCHLANG

Yes

No

Change the user language
Language code as a parameter

ASESSSWITCHSITE

Yes

No

Changes site
Codes X3SOLUTION/X3FOLDER/XTENDLANG/XTENDSITE as a setup

ATRACESET

No

ADLKTRACESET 

Update of the XTEND log

SEEINFO In order to run, action AXTDLOGIN must be configured with the login interface you have created for this site.

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Fields

The following fields are present on this tab :

Please select an action code

SEEREFERTTO See grid for Predefined actions.

  • Site (field FCYLIB)

Current Web site

  • Description (field INTIT)

Current action title

Close

 

Tab General

Fields

The following fields are present on this tab :

Action

  • Type (field ACTTYP)

This field indicates if the action is of type:

  • standard,.
  • login
  • or logout

The field has the default type 'Standard'.

  • Active on reload (field ACTREFRESH)

This field indicates whether the action must be carried out once again when the user presses the F5 key.

By default, this field is set to 'No' to block the action.
This prevents the creation of a new order when the user presses the F5 key.

  • Activity tracking (field LOGMOD)

This field is used to activate the activity tracking for the action.
A log is recorded in the .log file of the XTEND server.

Entity to delete

  • Stat deletion (field ENTSUPBEF)

The action may delete entities at the beginning or end of the execution.

  • By default the box is not ticked. the deletion occurs at the end of the execution if there is no error.

  • If the box is ticked: the deletion occurs at action start

For instance:

For an action passing an order:

  • Un-tick the box to delete the basket.
  • If the order was created without errors, the basket is deleted.

Grid Deletions

Enter the codes of the entities to be deleted.

Web service managmt

This field specifies the code of the interface called on by the action.

  • field INTTYP

 

  • Activate button (field WSOACT)

Select the button type of the object:

  • Read,
  • Create,
  • Delete,
  • Save,
  • Other: The button code must be entered.

  • Button code (field WSOACTBTN)

If the option 'Other' of the field 'Activate button' is selected, enter a specific button code.

For instance:

For the object Invoice, it is possible to enter 'V' so as to activate the button validation of the invoice.

  • Type of parameter (field WSOTYPPAR)

For an action of the type 'Other', select the 'signature' of the 'actionObject' method to be called.

For the X3 Object Web service, two 'actionObject' methods are available, having the same name but different parameters. These parameters are:

  • 'Keys' : a grid of object keys,
  • 'Data': The XML content of an object.

Grid Action parameters

Action parameter code.
The parameter is a 'Field token' that must be declared in the dictionary.

  • Value (field VALTYP40)

Two types of values are possible:

  • Constant : is used to enter a fixed value; the value must be entered in the column 'Constant'.
  • Entered: the value is entered in the 'Dynamic link' as a function of the usage context.

A parameter is generally valued in the 'Dynamic link':

  • From a field in the HTML form,
  • From a field of an entity of type session or action,
  • From the field of a block (Entity Access to data): in this case, the block ACURRENT is used to read the value.
  • Constant (field VALEUR40)

Value for the constant.

Close

 

Tab Interface mapping

Presentation

This tab displays the correspondence (mapping) between the XTEND fields and the setups of the sub-programs or X3 object fields.

Grids

Parameters upon receipt (Entities to Interface)

The grid 'Entities/Setup --> displays the correspondence between the action setups specified previously and the setups of the Web service associated with the interface.

SEEINFO In order to select an action parameter, the entity column should not be valuated.
In that case, the action parameter list is displayed by pressing the F12 key in the 'Field/Setup..' cell

It is also possible to 'map' directly the field of an entity to a Web service setup by specifying the entity code in the column entity.

Parameters upon receipt (Interface to Entities)

The grid 'Interface --> Entities displays the correspondence between the setups of the Web service associated with the interface and the XTEND entities created by the action.

___________________________

During the mapping of an X3 object Web service, setup AMODSTAMP of group ADXTEC contains the TimeStamp (identifier of last modification) of the X3 object.

AMODSTAMPis a supplied field token.

It is used to manage the update conflicts on objects that may take place in Web service mode (asynchronous).

If this setup is sent back to X3, the X3 process compares its value with that of the object stored in the database, and generates an error if these values differ('objet being modified on another workstation').

Close

 

Fields

The following fields are present on this tab :

Grid Entities/param. --> interface

The XTEND entity code is used to perform the parameter mapping.
Leave this field empty to 'map' an action parameter.

  • Fields/param (field FIEKEY20)

Action parameter code, or entity field code.

  • Group (field DSCGRP20)

Publication group or Web service screen code.

  • Interface parameter (field DSCCOD20)

Select 'No' to perform a mapping of N Xtend fields to N values of a same X3 parameter.

The column 'Index' can then be entered and is used to enter the index of the 'interface parameter' (X3 parameters) to be valued with the XTEND field value.

SEEREFERTTO For further information, see the paragraph on the multiple mapping.

  • Multi (field INTMLT20)

Select 'No' to perform a mapping of N values of a same X3 parameter to N Xtend fields.

The column 'Index' can then be entered and is used to enter the index of the X3 parameter giving the XTEND field value.

SEEREFERTTO For further information, see the paragraph on the multiple mapping.

  • Index (field DSCIND20)

Mapping of N Xtend fields -> N values of an X3 parameter :

Enter 'No'in the column 'Multi'.
In the value grid of the 'Interface parameters' (X3 parameter), the column 'Index' gives the index of the cell that will be valued with the XTEND field value.

SEEREFERTTO For further information, see the paragraph on the multiple mapping.

Interface --> entities

Action code containing the mapping of return if it has already been defined in another action.

In the case of an X3 object, the creation of an XTEND action is performed via X3 action button. The mapping of return is generally the same for all actions;  describe it in a single action.

Grid Publication

  • Group (field DSCGRP21)

Publication group or Web service screen code.

  • Interface parameter (field DSCCOD21)

Name of the sub-program parameter, or field code of the X3 object.

  • Multi (field INTMLT21)

Select 'No' to perform a mapping of N Xtend fields to N values of a same X3 parameter.

The column 'Index' can then be entered and is used to enter the index of the 'interface parameter' (X3 parameters) to be valued with the XTEND field value.

SEEREFERTTO For further information, see the paragraph on the multiple mapping.

  • Index (field DSCIND21)

Mapping of N values of an X3 parameter -> N Xtend fields:

Enter 'No'in the column 'Multi'.
The value of the XTEND field is given by the column 'Index' that is the index in the value grid of the 'interface parameter' (X3 parameter).

SEEREFERTTO For further information, see the paragraph on the multiple mapping.

Code of the entity in which the XTEND field will be created with the value of the 'interface parameter'.

  • Field (field FIEKEY21)

Code of the XTEND field to be created.

Close

 

About Multiple Mapping

The standard mapping (field by field) calls on the declaration of a 4GL setup by field.

In some cases, it is required not to declare a single setup by field, but to group field values in a single 4GL setup:

  • If the number of fields if superior to 50 (HTML form with a lot of entry fields).
    An X3 Web service does not accept more than 60 setups out of which 10 are used by XTEND as technical setups.
  • If the number of fields can be changed by the setups and if no modification of the Web service and the action mapping is required after each change.

GESAYA_1.jpg

XTEND authorizes the use of a single multi-dimensioned 4GL setup to save all the fields values via the columns 'Multi' and 'Index' of the mapping.

The correspondence value/field is defined by the position (index) in the grid.

'Multi' and 'Index' are active only if the interface setup is of dimension >1.

Standard mode (field by field)

Creation of a single mapping line.
The Multi setup has the value 'Yes' to indicate that a field will be created by XTEND entity with the value corresponding to the index of the current line.

The Index setup is not used.

Mode N values of an X3 setup -> N Xtend fields

Creation of as many mapping lines as XTEND fields to value.
The Multi setup has the value 'No' to indicate that it is necessary to enter only one XTEND field with the value of the X3 setup whose index is specified in the Index column.

Mode N Xtend fields -> N values of an X3 setup

Creation of as many mapping lines as values to add to the X3 setup.
The Multi setup has the value 'No' to indicate that it is necessary to enter the grid cell whose index is specified in the Index column with the XTEND field value.

Reports

By default, the following reports are associated with this function :

 PRTSCR : Screen print

This can be changed using a different setup.

Specific Buttons

This button is used to update the XTEND dictionary in XML format.

The X3WEB server takes into account only the dictionary with this format.

There is one XML file per dictionary.

For instance, the ACT.xml file corresponds to all the web actions for the current web site.

This button is used to copy a Web action.

Menu Bar

Tools / Validation with checking

Validation with a data coherency control on the XTEND dictionary. 

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation