1 Reply Latest reply on Mar 15, 2004 4:17 PM by 416900

    Conditional Transformations

    306285
      Does anyone have experience using the following transformations?

      FalseConditionalConcat
      TrueConditionalConcat
      FalseConditionalCopy
      TrueConditionalCopy

      I need to know the syntax/format of the "condition" parameter - can anyone help?

      Thanks,

      James
        • 1. Re: Conditional Transformations
          416900
          James,

          I'll just take you through the TrueConditionalCopy for now, the others follow on naturally.

          According to the transformation
          True Conditional Copy
          Description: Copy the source field(s) into the destination field(s) if condition is satisfied
          Parameters:
          condition – the condition

          Here is my mapping example:-
          P_RANK=TrueConditionalCopy (PARAMETER_LIST[f3].NAME, PARAMETER_LIST[f3].VALUE, "P_RANK")

          Here is my message data:-

          ....

          Maintain_Employees.Update_Employee:OAI/V1,OAI/V1,true,0
          PRIORITY: 50.0
          SEND_DATE: Mon Mar 15 16:06:20 GMT 2004
          RECEIVE_DATE: Mon Mar 15 15:59:17 GMT 2004
          CORRELATION_ID: UNICOM1079366353024
          PARAMETER_LIST[0]
          NAME: P_EMPLOYEE_NUMBER
          VALUE: 143.0
          PARAMETER_LIST[1]
          NAME: P_CREATION_TYPE
          VALUE: U
          PARAMETER_LIST[2]
          NAME: P_RANK
          VALUE: Major

          ....



          Here is the transform:-

          ....
          Mon Mar 15 16:06:21 GMT 2004: Processing stackframe: [ -- Empty -- ]
          Mon Mar 15 16:06:21 GMT 2004: About to perform the transformation.
          Mon Mar 15 16:06:21 GMT 2004: Outbound Transform Engine: performing transform.
          Transform: TrueConditionalCopy
          Source Fields: [Maintain_Employees_Update_Employee_OAI_V1_P:OAI/V1.PARAMETER_LIST[f3].NAME, Maintain_Employees_Update_Employee_OAI_V1_P:OAI/V1.PARAMETER_LIST[f3].VALUE]
          Destination Fields: [Update_Employee_CO:OAI/V1.P_RANK]
          Source values: [P_RANK,Major]
          Params: [ P_RANK ]
          Mon Mar 15 16:06:21 GMT 2004: Outbound Transform Engine: done performing transform TrueConditionalCopy.
          Results: [Major]

          ....

          As you can see I've used the TrueConditionalCopy transformation to look for the array PARAMETER_LIST for the Name / Value pair relating to "P_RANK". Basically, the transform looks for a specified value in your source code, and if the value is of a certain "name", then copy the source value into the destination value.

          I hope this helps you.

          Ian