Page 78 -
P. 78

2  The Language: Rationale and Fundamentals                      65


























                           Fig. 2.26 Variable specification and parameter passing in YAWL


                           variable and a given task. The task can be of any form: atomic, composite, multiple
                           instance, or composite multiple instance; however, in all cases, the parameter oper-
                           ates on every instance of the task to which it applies. Each task may have multiple
                           simple parameters associated with it. There are two types of simple parameter:

                             Input parameters involve the application of an XQuery function to a net variable
                              in the block surrounding a task and placing the resultant value in a nominated
                              task variable.
                             Output parameters involve the application of an XQuery function to a task vari-
                              able and placing the resultant value in a nominated net variable in the surrounding
                              block.
                           Figure 2.27 illustrates the use of simple parameters in the Driving Test Process
                           shown earlier. In this example, they are used to map data values between the net
                           variable ApplicantStatus and the task variable iApplicantStatus. In each case, the
                           parameter is specified in the form of an XQuery expression. The usage descriptor
                           for the iApplicantStatus task variable is Input & Output, denoting that the value of
                           the variable is passed in at task commencement and passed out at its conclusion.
                              The situation is essentially the same whether the parameter is transferring a data
                           element to/from an atomic task or a composite task, except that the target variable
                           is identified as both a task variable in the composite task and as a net variable in the
                           associated decomposition. Figure 2.28 illustrates the situation where the task being
                           targeted is composite in form and has an associated decomposition specified in the
                           form of a subprocess. In this situation, the net variable ApplicantStatus is passed to
                           the variable iApplicantStatus that appears as both a task variable for the Schedule
                           Practical Test task and is also a net variable in the Practical Test Scheduling subpro-
   73   74   75   76   77   78   79   80   81   82   83