FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// =======YearIDGenerator======= ==== Description ==== The [[:en:software:tim:actionhandler|Handler]] creates an number, which can be used as a unique classification. Typically, the generated ID is connected by the [[:en:software:tim:actionhandler:renameinstancehandler|RenameInstanceHandler]]. The generated ID is set-up as such: YYYYxxxx; in which YYYY is the current year und xxxx represents a sequential counter number (Example: 20110001). ---- ==== Action Class ==== com.dooris.bpm.actionhandler.YearIDGenerator ---- == Event Type == any type == Action Name == any text == Mandatory Fields == Here, the user can set a variable to which the created value is written. See [[#Example]] Caution: The variable name "id" may not be used! ---- ==== Parameter ==== The generated ID can be called on using the variable #{key}, and can then be processed in the handler. If the variable is required as a [[en:glossar#process_variable|process variable]] in the process development, the mandatory field must be set! \\ == pattern == This parameter is optional and can be used to build [[en:glossar#process_variable|Process variable(s)]] into [[en:glossar#process_instance|Process instance names]]. Here, the variable #{key} can be called upon. See [[#Example]] == length == The "length" parameter increases the ID length by a specified number of consecutive numbers.\\ "length" can be set manually. For instance, if "length=5" is entered, the ID will be composed of the current year + 5 consecutive numbers. > If nothing is set manually, the ID is composed of the current year + 4 consecutive numbers by default. == prefix == This adds a specified prefix to the generated ID, with a blank space between the prefix and the ID > This parameter is __**only**__ chosen when the **pattern** parameter is not being used! ---- ==== Example ==== Example 1\\ \\ {{ :software:tim:actionhandler:yearidgenerator1.png? }}\\ Four-digit ID is generated and given an instance name. The ID is saved in the yearID process variable.\\ \\ Example 2\\ \\ {{ :software:tim:actionhandler:yearidgenerator2.png }}\\ Four-digit ID is generated and the pattern is set as the instance name. The ID is saved in the yearID process variable. In this example, the process instance is now named "ERSETZ MICH 20140003".\\ \\ Example 3\\ {{ :software:tim:actionhandler:yearidgenerator3.png }}\\ **Five-digit** ID is created and the pattern is set as the instance name. The ID is saved in the yearID process variable. In this example, the process instance is now named "ERSETZ MICH 201400004".\\ \\ Example 4\\ {{ :software:tim:actionhandler:yearidgenerator4.png }}\\ \\ Five-digit ID is created. The instance name is now composed of the given instance name, the prefix, and the ID together. The ID is saved in the yearID process variable. In this example, the process instance is now called "Instanzname PREFIX 201400005".\\