Problem with UUID creation: key and version cut off
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2014 05:38 AM
Hi everybody,
we are using Activiti 5.11 and we activated the UUID generation for the process ID.
Now we detected the following problem in class BpmnDeployer in method deploy:
When the generated process id is longer than 64 characters, the key and version information is cut off.
This causes problems in our application.
Do you have a solution for this?
Or other question: Is the key and version info needed during process execution?
Best regards
Frauke
we are using Activiti 5.11 and we activated the UUID generation for the process ID.
Now we detected the following problem in class BpmnDeployer in method deploy:
When the generated process id is longer than 64 characters, the key and version information is cut off.
This causes problems in our application.
String nextId = idGenerator.getNextId(); String processDefinitionId = processDefinition.getKey() + ":" + processDefinition.getVersion() + ":" + nextId; // ACT-505 // ACT-115: maximum id length is 64 charcaters if (processDefinitionId.length() > 64) { processDefinitionId = nextId; }
Do you have a solution for this?
Or other question: Is the key and version info needed during process execution?
Best regards
Frauke
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 09:32 AM
What's exactly the problem you are facing. The logic just uses nextId as the process definition id, which should be fine.
Could you explain the issue in more details?
Best regards,
Could you explain the issue in more details?
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2014 11:35 AM
I see, yes you are right. I think the 64 characters limit is too strict. Could you create a JIRA issue?
Best regards,
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2014 03:44 AM
Ok, I created a JIRA ticket, ACT-2144
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2014 03:58 AM
Hi everybody,
now I found some code where the above problem matters:
I create a query on the history table like that:
<code>HistoricProcessInstanceQuery finishedSubprocesses = m_historyService
.createHistoricProcessInstanceQuery()
.processDefinitionKey(processKey)
.superProcessInstanceId(m_processInstanceId)
.finished();
</code>
This resulting statement is created by Activiti:
<code>select RES.* from ACT_HI_PROCINST RES
inner join ACT_RE_PROCDEF DEF on RES.PROC_DEF_ID_ = DEF.ID_
WHERE RES.PROC_DEF_ID_ like ? and RES.END_TIME_ is not NULL
and RES.SUPER_PROCESS_INSTANCE_ID_ = ? order by RES.ID_ asc LIMIT ? OFFSET ?
</code>
With the 'like' you assume that the process key will be part of the process definition key, but that is not so in the above use case.
Best regards
Frauke
now I found some code where the above problem matters:
I create a query on the history table like that:
<code>HistoricProcessInstanceQuery finishedSubprocesses = m_historyService
.createHistoricProcessInstanceQuery()
.processDefinitionKey(processKey)
.superProcessInstanceId(m_processInstanceId)
.finished();
</code>
This resulting statement is created by Activiti:
<code>select RES.* from ACT_HI_PROCINST RES
inner join ACT_RE_PROCDEF DEF on RES.PROC_DEF_ID_ = DEF.ID_
WHERE RES.PROC_DEF_ID_ like ? and RES.END_TIME_ is not NULL
and RES.SUPER_PROCESS_INSTANCE_ID_ = ? order by RES.ID_ asc LIMIT ? OFFSET ?
</code>
With the 'like' you assume that the process key will be part of the process definition key, but that is not so in the above use case.
Best regards
Frauke
