RBA aFunctions

CLEAR_ALL_MTYP_PARAMS

MTYP_PARAMETER()

Set all MTYP_PARAMETER Object field values to null. If a field value is null then it is not passed to a step; This function always returns “”.

Return-type :java.lang.String
Returns:Always returns a blank string “”.

COMMIT

COMMIT()

Immediately commits the current Object Values into the output buffer and increments the output_row_count++; This function always returns “”.

Return-type :java.lang.String
Returns:Always returns a blank string “”.

EXECUTE_PROCESSING_GROUP

EXECUTE_PROCESSING_GROUP(String PROCESSING_GROUP, String MTYP_PARAMETER_LIST, String EXCEPTION_HANDLING[, String MODEL_TYPE=null, String TITLE=null])

Execute an AdapLink Model Type Processing Group under a model type. The call is non-blocking and returns immediately once the new process starts.

Arguments:
  • PROCESSING_GROUP (java.lang.String) – The Processing group that needs to be executed.
  • MTYP_PARAMETER_LIST (java.lang.String) –

    Model Type fieldlist that needs to be passed as parameters. Accepted values:

    1. * for passing all MTYP_PARAMETER parameters.
    2. BLANK if no parameters should be passed.
    3. fieldlist seperated by & for selected parameters.
  • EXCEPTION_HANDLING (java.lang.String) – Parameter which says how to handle the execution in case any exception raised during launch. Valid values are “EXCEPTION” OR “BOOLEAN”.
  • MODEL_TYPE (java.lang.String) – (Optional) Processing group belongs to a modelType. Default value is null / blank which means use current modelType.
  • TITLE (java.lang.String) – (Optional) The optional title that should used as job name. Default value is null / blank which means use processing group description.
Return-type :

java.lang.String

Returns:

Always returns a blank string “”.

Example:

=EXECUTE_PROCESSING_GROUP("GROUP1", "*", "BOOLEAN", "MYMODEL", "My Job")

EXECUTE_STEP / ALRPC_EXECUTE

EXECUTE_STEP(String step[, String step_title=""])

Execute an AdapLink MTYP step, with an optional step title. Returns Boolean TRUE upon success, else Boolean FALSE.

Arguments:
  • step (java.lang.String) – The step that needs to be executed.
  • step_title (java.lang.String) – (Optional) The optional step title that should shown in the progress-bar.
Return-type :

java.lang.Boolean

Returns:

Boolean TRUE upon success, else Boolean FALSE.

Example:

=EXECUTE_STEP("STEPID", "a custom title")

FAMILY_EXEC

FAMILY_EXEC(String familyName)

Immediately executes the family with the given family name. This function always returns “”.

Arguments:
  • familyName (java.lang.String) – The family name whose corresponding family should be executed immediately.
Return-type :

java.lang.String

Returns:

Always returns a blank string “”.

Warning

Never use FAMILY_EXEC to form a loop as it will lead to stack overflow. For looping always use FAMILY_NEXT.

Example:

=FAMILY_EXEC(familyName2)

FAMILY_NEXT

FAMILY_NEXT(String familyName)

Add the family with the given familyName on TOP of the current execution stack. Once the current family exits the family on the top of the execution stack is run. Calling it multiple times within the same family just pushes the specified families on to the stack and will be executed in LIFO (Last in first out) order once the current family exits. This function can be safely used to form loops. This function always returns “”.

Arguments:
  • familyName (java.lang.String) – The family name whose corresponding family should be added TOP of the current execution stack.
Return-type :

java.lang.String

Returns:

Always returns a blank string “”.

Example:

=FAMILY_NEXT(familyName2)

FORCE_CONTINUE

FORCE_CONTINUE()

Forces continuation of rules in the same family. The default behavior is when a criteria is met, all rules following it in the same family are skipped. The FORCE_CONTINUE function allows overriding this behavior. This function always returns “”.

Return-type :java.lang.String
Returns:Always returns a blank string “”.

Example: An example showing a single family containing multiple execution steps with the use of FORCE_CONTINUE

Rule Family:
 Rule Family: Full_Load ( Smoothie full load example )
 Rule Header:
    Rule: INIT
    RuleLHS: --EMPTY--
    RuleRHS:
       T_SUCCESS = =True
        = =FORCE_CONTINUE()
    Rule: Delete all staging data
    RuleLHS:
       10: T_SUCCESS EQ (=True, )
    RuleRHS:
       LOG_SYS_TRG = SAP_STAGE
       TABLES_TO_DEL = *
       T_SUCCESS = =EXECUTE_STEP("600")
        = =FORCE_CONTINUE()
    Rule: Delete all ALDH data
    RuleLHS:
       10: T_SUCCESS EQ (=True, )
    RuleRHS:
       LOG_SYS_TRG = LOG_ALDH
       TABLES_TO_DEL = mat_header&loc_header&cons_header&mat_location&mat_factor&mat_loc_cons&model_mat_loc_cons&qty_staging
       T_SUCCESS = =EXECUTE_STEP("610")
        = =FORCE_CONTINUE()

GET_LOOPAT_COUNTER

GET_LOOPAT_COUNTER()

This function returns the number of iterations that has been performed by the LOOP-AT functionality under a rule family.

Return-type :java.lang.Integer
Returns:The number of iterations that has been performed by the LOOP-AT functionality under a rule family.

INPUT_ROW_NUM

INPUT_ROW_NUM()

A function that returns the current input row count as Integer.

Return-type :java.lang.Integer
Returns:The current input row count as Integer.

IS_BREAK_LOOPAT_ON

IS_BREAK_LOOPAT_ON()

Returns whether the SET_BREAK_LOOPAT_ON is called as Boolean.

Return-type :java.lang.Integer
Returns:True if the SET_BREAK_LOOPAT_ON is called otherwise False.

LAST_MESSAGE

LAST_MESSAGE([Object defaultMessage = "Oops! No such ReturnCodeMessage Object is defined"])

Returns the last execution error or info message of EXECUTE_STEP().

Arguments:
  • defaultMessage (java.lang.Object) – (Optional) If last EXECUTE_STEP() message is not available then returns this default value.
Return-type :

java.lang.String

Returns:

The last EXECUTE_STEP() execution error / info message.

LAST_STATUS

LAST_STATUS([Boolean defaultValue=False])

Returns true if the last EXECUTE_STEP() execution was success, else false.

Arguments:
  • defaultValue (java.lang.Object) – (Optional) If last EXECUTE_STEP() status is not available then returns this default value.
Return-type :

java.lang.Boolean

Returns :

Returns true if the last EXECUTE_STEP() execution was success, else false.

OUTPUT_ROW_NUM

OUTPUT_ROW_NUM()

A function that returns the current output row count as Integer.

Return-type :java.lang.Integer
Returns:The current output row count as Integer.

SET_BREAK_LOOPAT_ON

SET_BREAK_LOOPAT_ON()

A function that breaks the LOOPAT at the current iteration. When this function is called the current iteration will continue to be executed but the next iteration of LOOPAT will not be performed.

Return-type :java.lang.String
Returns:Always returns a blank string “”.