Syntax

Process

VALIDATION

  • Multiple occurence

Parameter
SQL

INSERT

  • Insert data into database
  • Multiple occurence

UPDATE

  • Update a record in database
  • Multiple occurence

DELETE

  • Delete a record in database
  • Multiple occurence

FETCH

  • Fetch a record from database
  • Multiple occurence

SCRIPT

  • Javascript code to be executed, action variable available
  • Multiple occurence

PLSQL

  • PL/SQL code to be executed
  • Multiple occurence

WHILE

  • Value: javascript to be evaluated, this code must return true or false.
  • Multiple occurence

Process

  • Process to be executed while the code above return true

IF

  • Value: javascript to be evaluated, this code must return true or false.
  • Multiple occurence

TRUE

  • Process to be executed while the code above return true

FALSE

  • Process to be executed while the code above return false

Example

Process
    Fetch
        TableName==CLUB
        PrimaryKey
            CLUB_ID==pk
        Column
            CLUB_ID==CLUB_ID
            CODE==CODE
            NAME==NAME
            AVATAR==AVATAR
            SLOGAN==SLOGAN
            STATUS==STATUS
            CREATED==TO_CHAR(CREATED,'DD/MM/YYYY HH24:MI:SS')
            CREATOR==CREATOR
            MODIFIED==TO_CHAR(MODIFIED,'DD/MM/YYYY HH24:MI:SS')
            MODIFIER==MODIFIER
        DetailData
            CLUB_ATTR==FK_CLUB_ATTR_C
                ForeignKey
                    CLUB_ID==pk
                Column
                    ATTR_ID==ATTR_ID
                    NAME==NAME
                    VALUE==VALUE
    Script=:
    :{
        data = action.getParameters().remove("FK_CLUB_ATTR_C");
        if(data != null)
        {
            for(i = 0;i < data.size();i++)
            {
                row = data.get(i);
                id = row.get(0);
                name = row.get(1);
                value = row.get(2);
                param = "FK_CLUB_ATTR_C." + id;
                if(name != null && !name.equals(""))
                    param += "_" + name;
                action.getParameters().put(param,value)
            }
        }
    :}
    Update
        TableName==CLUB
        PrimaryKey
            CLUB_ID==pk
        Column
            CODE==CODE
            NAME==NAME
            AVATAR==AVATAR
            SLOGAN==SLOGAN
            STATUS==STATUS
            MODIFIED==MODIFIED
                Automatic==current_timestamp
            MODIFIER==MODIFIER
                Automatic==!"'" + action.getParameters().get("session.userName") + "'"
        DetailData
            CLUB_ATTR==FK_CLUB_ATTR_C
                ForeignKey
                    CLUB_ID==pk
                Column
                    ATTR_ID==0
                    NAME==1
                    VALUE==2
            CLUB_ADMIN==FK_CLUB_ADM_MBR
                ForeignKey
                    CLUB_ID==pk
                Column
                    MEMBER_ID==0
        Validation
            Unique
                UK_CLUB
                    CODE==CODE
                        Format==UPPER(CODE)=UPPER(?)