cancel
Showing results for 
Search instead for 
Did you mean: 

Change process name

mario_fliegner
Confirmed Champ
Confirmed Champ
Hi there,

I'm searching for a solution to accomplish the following requirement: Each time a process is launched, its name will created out of the name of the process definition concatenated by the current date, like: "My Approval Process - May 18th 2016".
I'm looking for a possibility to influence that name. For example, instead the date I need a unique number and the current user name. Can someone give me an advice? At least which class files of the core I have to review to make a step forward?

Thanks in advance,
Itzamna
4 REPLIES 4

messmeister
Champ in-the-making
Champ in-the-making
I need to know that as well. Also if there is a change to change the name while the process is running.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi All,

use

  /**
   * 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

mario_fliegner
Confirmed Champ
Confirmed Champ
Thanks for pointing out!
Do you also know what's the best hookup point to change the process name? At least an event listener or an execution listener is already to late in the process. Should I use the process engine configuration (com.activiti.api.engine.ProcessEngineConfigurationConfigurer) instead?

Thanks!

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I would use businessKey instead. Start the process with the businessKey.

Regards
Martin