@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RunAs(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") public class SequenceService extends Object
The sequence numbers are stored in the item 'sequencenumbers' of the configuration entity with the name "BASIC" in in the following format
[GROUP]=123
Optimistic Locking Problem
In earlier versions, the method runs in a OptimisticLockException in case that multiple processes run in parallel. To fix this the service is changed into a singleton. See issue #290.
| Modifier and Type | Class and Description |
|---|---|
class |
SequenceService.SequenceNumber
A SequenceNumber is a internal object separating a fixed part form a number
part.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ITEM_SEQUENCENUMBER |
static String |
ITEM_SEQUENCENUMBER_DEPRECATED |
| Constructor and Description |
|---|
SequenceService() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeSequenceNumber(org.imixs.workflow.ItemCollection documentContext)
This method computes the sequence number based on a configuration entity with
the name "BASIC".
|
boolean |
hasSequenceNumber(org.imixs.workflow.ItemCollection documentContext)
This method verifies if a sequence number already exists.
|
public static final String ITEM_SEQUENCENUMBER
public static final String ITEM_SEQUENCENUMBER_DEPRECATED
public void computeSequenceNumber(org.imixs.workflow.ItemCollection documentContext)
throws org.imixs.workflow.exceptions.AccessDeniedException
This method loads and updates the configuration entity in a new transaction. In combination with the
InvalidWorkitemExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionpublic boolean hasSequenceNumber(org.imixs.workflow.ItemCollection documentContext)
The method also migrate the old item name 'numsequencenumber' into the new item name 'sequencenumber'
documentContext - Copyright © 2016–2022 Imixs Software Solutions GmbH. All rights reserved.