Applying bidirectional text layout transformation

Business Automation Workflow provides bidirectional (bidi) text layout options for process applications. Bidirectional text layout transformation can be applied to any string variable (either input or output) as part of the preprocessing, postprocessing, or implementation of a service. Typically, bidirectional text layout transformations are required for conversion of bidi textual data stored in databases to a Logical LTR format that is assumed by the Business Automation Workflow user interface, but can be used for other purposes.

About this task

Complete the following steps for bidi text layout transformation:

Procedure

  1. From the palette, add a server script to a service, such as a heritage human service.
    Note: This transformation can be performed from any server-side service. To perform a text layout transformation in a client-side human service, include a call to a server-side service, such as an integration service, from within your client-side human service flow.
  2. In the Variables tab for the service, add an input string variable for the string to be transformed.
  3. In the Diagram tab, select the server script.
  4. In the Implementation tab of the Properties view, enter the script for calling the bidi engine to implement the transform.
    For example:
    tw.local.Var = tw.system.bidiTransformation(tw.local.Var,"input_bidi_format", "outputBidiFormat", symmetricSwapping)
    where tw.local.Var1 is the string to be transformed.
    The input BidiFormat and output BidiFormat can have the following values:
    • LLTR - logical left-to-right
    • LRTL - logical right-to-left
    • LCLR - logical contextual left-to-right
    • LCRL - logical contextual right-to-left
    • VLTR - visual left-to-right
    • VRTL - visual right-to-left
    • VCLR - visual contextual left-to-right
    • VCRL - visual contextual right-to-left
    In the following example, a logical left-to-right string is transformed to LRTL - logical right-to-left and the Boolean value isSymmetricSwapping is set to true:

    tw.local.Var1 = tw.system.bidiTransformation(tw.local.Var1,"LLTR", "LRTL", true)

  5. Click Save or Finish Editing.

What to do next

To test your service, wire it to a coach that has an input variable and text control that is bound to the transformed string variable, then run the coach.