What is the best way for generating number series in Origam?

E.g. for invoice numbering - something like 2014/00001, 2014/00002, 2014/0000n.

There is a build-in support for numbering in Origam. Number rows are configured from Counter screen, which can be either executed directly from Origam Architect or the screen could be added to the application menu.

On that screen you can define all the counters you need in your application. For each counter you can define more time intervals. For each time interval you can define different prefix and so you can produce exactly what you have requested. In your particular case you would create a counter with an interval for a year 2014, with prefix set to ‘2014/’, ‘number length’ set to ‘5’, ‘From’ set to 0 and ‘increment’ set to ‘1’. You should also add rows for years 2015, 2016, etc.

Generating of a new number can be done by calling a function from XPath or from a xsl transformation. The function is described here

So the most straighforward way is to place the function to a transformation that generates a new entitity (e.g. when generation invoice). But there are other possibilities e.g. when the creation of number is dependent on status change it can be generated by a workflow triggered by a state workflow.

Great, thank you, it does work well :slight_smile: