Develop > Document Engine Guide > Work order example overview > Add a Process definition record

Add a Process definition record

The Process definition record defines how the system responds to a user's action. The Process definition uses RAD expressions, JavaScript, and calls to existing RAD applications to perform actions against the current record, in this case, a work order record.

To add a process definition record, follow these steps:

  1. From the System Navigator, click Tailoring > Document Engine > Processes to open the Process Definition form.
  2. Type create.WorkOrder in the Process Name field.
  3. Click Add.
  4. On the Initial Expressions tab, type the following expression:

    • $L.void=fduplicate($relatedRec, $L.file)
    • $relatedCIs={}
  5. Click Save.
  6. On the Initial Javascript tab, type the following expression:

    system.vars.$relatedCIs=system.library.BSGFunctions.getMembers(system.vars.$L_file.affected_item, false, 3

    Note This expression must be entered on one line.

  7. Click Save.
  8. On the RAD tab, enter the following information:

    Field Value
    Expressions evaluated before RAD call

    Type the following two expressions:

    $L.wiz.name="Create Workorder-1"

    if (not null(logical.name in $L.file)) then ($relatedCIs=insert ($RelatedCIs, 1, 1, logical.name in $L.file))

    Note Be sure to enter this expression on one line. Also note that when entering this expression, there is no space after the word insert. For example, the expression above continues at the word 'insert' as follows:

    insert($RelatedCIs, 1, 1, logical.name in $L.file))

    RAD Application wizard.run
    Parameter Names name
    Parameter Values $L.wiz.name
    Parameter Names
    text
    Parameter Values $L.exit
    Condition true
  9. Click Save.
  10. On the Final Expressions tab, type cleanup($relatedRec).

  11. Click Save and then OK.