field-mappings.md 26.9 KB
Newer Older
茶陵後's avatar
茶陵後 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
# Appendix A. Flow Definition Language 1.0 to 2.0 Mappings

The flow definition language has changed since the 1.0 release.
This is a listing of the language elements in the 1.0 release, and how they map to elements in the 2.0 release.
While most of the changes are semantic, there are a few structural changes.
Please see the upgrade guide for more details about changes between Web Flow 1.0 and 2.0.



**Table A.1. Mappings**

|      SWF 1.0       |       SWF 2.0       |                                 Comments                                 |                        |                                                                          |
|--------------------|---------------------|--------------------------------------------------------------------------|------------------------|--------------------------------------------------------------------------|
|      *action*      |        *\**         |                            use \<evaluate /\>                            |                        |                                                                          |
|                    |        bean         |                                                                          |           \*           |                                                                          |
|                    |        name         |                                                                          |           \*           |                                                                          |
|                    |       method        |                                                                          |           \*           |                                                                          |
|   *action-state*   |   *action-state*    |                                                                          |                        |                                                                          |
|                    |         id          |                                                                          |           id           |                                                                          |
|                    |         \*          |                                                                          |         parent         |                                                                          |
|     *argument*     |        *\**         |           use \<evaluate expression="func(arg1, arg2, ...)"/\>           |                        |                                                                          |
|                    |     expression      |                                                                          |                        |                                                                          |
|                    |   parameter-type    |                                                                          |                        |                                                                          |
|    *attribute*     |     *attribute*     |                                                                          |                        |                                                                          |
|                    |        name         |                                                                          |          name          |                                                                          |
|                    |        type         |                                                                          |          type          |                                                                          |
|                    |        value        |                                                                          |         value          |                                                                          |
| *attribute-mapper* |        *\**         |      input and output elements can be in flows or subflows directly      |                        |                                                                          |
|                    |        bean         |                                                                          |           \*           |         now subflow-attribute-mapper attribute on subflow-state          |
|   *bean-action*    |        *\**         |                            use \<evaluate /\>                            |                        |                                                                          |
|                    |        bean         |                                                                          |           \*           |                                                                          |
|                    |        name         |                                                                          |           \*           |                                                                          |
|                    |       method        |                                                                          |           \*           |                                                                          |
|  *decision-state*  |  *decision-state*   |                                                                          |                        |                                                                          |
|                    |         id          |                                                                          |           id           |                                                                          |
|                    |         \*          |                                                                          |         parent         |                                                                          |
|   *end-actions*    |      *on-end*       |                                                                          |                        |                                                                          |
|    *end-state*     |     *end-state*     |                                                                          |                        |                                                                          |
|                    |         id          |                                                                          |           id           |                                                                          |
|                    |        view         |                                                                          |          view          |                                                                          |
|                    |         \*          |                                                                          |         parent         |                                                                          |
|                    |         \*          |                                                                          |         commit         |                                                                          |
|  *entry-actions*   |     *on-entry*      |                                                                          |                        |                                                                          |
| *evaluate-action*  |     *evaluate*      |                                                                          |                        |                                                                          |
|                    |     expression      |                                                                          |       expression       |                                                                          |
|                    |        name         |                                                                          |           \*           |use \<evaluate ...\> \<attribute name=”name” value="..." /\> \</evaluate\>|
|                    |         \*          |                                                                          |         result         |                                                                          |
|                    |         \*          |                                                                          |      result-type       |                                                                          |
|*evaluation-result* |        *\**         |                     use \<evaluate result="..." /\>                      |                        |                                                                          |
|                    |        name         |                                                                          |           \*           |                                                                          |
|                    |        scope        |                                                                          |           \*           |                                                                          |
|*exception-handler* | *exception-handler* |                                                                          |                        |                                                                          |
|                    |        bean         |                                                                          |          bean          |                                                                          |
|   *exit-actions*   |      *on-exit*      |                                                                          |                        |                                                                          |
|       *flow*       |       *flow*        |                                                                          |                        |                                                                          |
|                    |         \*          |                                                                          |      start-state       |                                                                          |
|                    |         \*          |                                                                          |         parent         |                                                                          |
|                    |         \*          |                                                                          |        abstract        |                                                                          |
|*global-transitions*|*global-transitions* |                                                                          |                        |                                                                          |
|        *if*        |        *if*         |                                                                          |                        |                                                                          |
|                    |        test         |                                                                          |          test          |                                                                          |
|                    |        then         |                                                                          |          then          |                                                                          |
|                    |        else         |                                                                          |          else          |                                                                          |
|      *import*      |    *bean-import*    |                                                                          |                        |                                                                          |
|                    |      resource       |                                                                          |        resource        |                                                                          |
|   *inline-flow*    |        *\**         |                      convert to new top-level flow                       |                        |                                                                          |
|                    |         id          |                                                                          |           \*           |                                                                          |
| *input-attribute*  |       *input*       |                                                                          |                        |                                                                          |
|                    |        name         |                                                                          |          name          |                                                                          |
|                    |        scope        |                                                                          |           \*           |         prefix name with scope \<input name="flowScope.foo" /\>          |
|                    |      required       |                                                                          |        required        |                                                                          |
|                    |         \*          |                                                                          |          type          |                                                                          |
|                    |         \*          |                                                                          |         value          |                                                                          |
|   *input-mapper*   |        *\**         |               inputs can be in flows and subflows directly               |                        |                                                                          |
|     *mapping*      |  *input or output*  |                                                                          |                        |                                                                          |
|                    |       source        |                                                                          |     name or value      |      name when in flow element, value when in subflow-state element      |
|                    |       target        |                                                                          |     name or value      |      value when in flow element, name when in subflow-state element      |
|                    |  target-collection  |                                                                          |           \*           |                           no longer supported                            |
|                    |        from         |                                                                          |           \*           |                          detected automatically                          |
|                    |         to          |                                                                          |          type          |                                                                          |
|                    |      required       |                                                                          |        required        |                                                                          |
| *method-argument*  |        *\**         |           use \<evaluate expression="func(arg1, arg2, ...)"/\>           |                        |                                                                          |
|  *method-result*   |        *\**         |                     use \<evaluate result="..." /\>                      |                        |                                                                          |
|                    |        name         |                                                                          |           \*           |                                                                          |
|                    |        scope        |                                                                          |           \*           |                                                                          |
| *output-attribute* |      *output*       |                                                                          |                        |                                                                          |
|                    |        name         |                                                                          |          name          |                                                                          |
|                    |        scope        |                                                                          |           \*           |         prefix name with scope \<output name="flowScope.foo" /\>         |
|                    |      required       |                                                                          |        required        |                                                                          |
|                    |         \*          |                                                                          |          type          |                                                                          |
|                    |         \*          |                                                                          |         value          |                                                                          |
|  *output-mapper*   |        *\**         |               output can be in flows and subflows directly               |                        |                                                                          |
|  *render-actions*  |     *on-render*     |                                                                          |                        |                                                                          |
|       *set*        |        *set*        |                                                                          |                        |                                                                          |
|                    |      attribute      |                                                                          |          name          |                                                                          |
|                    |        scope        |                                                                          |           \*           |          prefix name with scope \<set name="flowScope.foo" /\>           |
|                    |        value        |                                                                          |         value          |                                                                          |
|                    |        name         |                                                                          |           \*           |     use \<set ...\> \<attribute name=”name” value="..." /\> \</set\>     |
|                    |         \*          |                                                                          |          type          |                                                                          |
|  *start-actions*   |     *on-start*      |                                                                          |                        |                                                                          |
|   *start-state*    |        *\**         |now \<flow start-state="..."\>, or defaults to the first state in the flow|                        |                                                                          |
|                    |        idref        |                                                                          |           \*           |                                                                          |
|  *subflow-state*   |   *subflow-state*   |                                                                          |                        |                                                                          |
|                    |         id          |                                                                          |           id           |                                                                          |
|                    |        flow         |                                                                          |        subflow         |                                                                          |
|                    |         \*          |                                                                          |         parent         |                                                                          |
|                    |         \*          |                                                                          |subflow-attribute-mapper|                                                                          |
|    *transition*    |    *transition*     |                                                                          |                        |                                                                          |
|                    |         on          |                                                                          |           on           |                                                                          |
|                    |    on-exception     |                                                                          |      on-exception      |                                                                          |
|                    |         to          |                                                                          |           to           |                                                                          |
|                    |         \*          |                                                                          |          bind          |                                                                          |
|                    |         \*          |                                                                          |        validate        |                                                                          |
|                    |         \*          |                                                                          |        history         |                                                                          |
|      *value*       |       *value*       |                                                                          |                        |                                                                          |
|       *var*        |        *var*        |                                                                          |                        |                                                                          |
|                    |        name         |                                                                          |          name          |                                                                          |
|                    |        class        |                                                                          |         class          |                                                                          |
|                    |        scope        |                                                                          |           \*           |                            always flow scope                             |
|                    |        bean         |                                                                          |           \*           |                 all Spring beans can be resolved with EL                 |
|    *view-state*    |    *view-state*     |                                                                          |                        |                                                                          |
|                    |         id          |                                                                          |           id           |                                                                          |
|                    |        view         |                                                                          |          view          |                                                                          |
|                    |         \*          |                                                                          |         parent         |                                                                          |
|                    |         \*          |                                                                          |        redirect        |                                                                          |
|                    |         \*          |                                                                          |         popup          |                                                                          |
|                    |         \*          |                                                                          |         model          |                                                                          |
|                    |         \*          |                                                                          |        history         |                                                                          |
|        *\**        |*persistence-context*|                                                                          |                        |                                                                          |
|        *\**        |      *render*       |                                                                          |                        |                                                                          |
|                    |         \*          |                                                                          |       fragments        |                                                                          |
|        *\**        |      *secured*      |                                                                          |                        |                                                                          |
|                    |         \*          |                                                                          |       attributes       |                                                                          |
|                    |         \*          |                                                                          |         match          |                                                                          |