cancel
Showing results for 
Search instead for 
Did you mean: 

processInstance/historicProcessInstance.getName() always return null

quaff
Champ in-the-making
Champ in-the-making
I am using activiti 5.17.0 with mysql 5.6, column "NAME_" of table "act_ru_execution" and "act_hi_procinst" is null forever. It cause processInstance/historicProcessInstance.getName() always return null.
I start all instances via formService.submitStartFormData(processDefinitionId, businessKey, properties). Is it a known bug?
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

you can set process instance name by

  /**
   * Sets the name for the process instance with the given id.
   * @param processInstanceId id of the process instance to update
   * @param name new name for the process instance
   * @throws ActivitiObjectNotFoundException
   *    when the given process instance does not exist.
   */
  void setProcessInstanceName(String processInstanceId, String name);

Regards
Martin

quaff
Champ in-the-making
Champ in-the-making
Thanks, I thought it will use processDefinitionName as default.

maudrid
Champ on-the-rise
Champ on-the-rise
I'm using  setProcessInstanceName(String processInstanceId, String name) in a script task, but it does not change the name of the process instance.
<code>
var processInstanceName = 'test';
var processInstance = execution.getProcessInstance();
// does not work
processInstance.setName(processInstanceName);
// does not work
runtimeService.setProcessInstanceName(processInstance.getId(), processInstanceName);
</code>

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi maudrid,

COuld you create jUnit test for it please?
https://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin