After process model deployed, act_de_procdef(key) is different from act_de_model(key)

i use /app-repository/deployments to deploy a process model.

After I this this deployment endpoint, I found that act_re_procdef has been created.

however, the act_re_procdef (key) has a prefix “a” than my original act_de_model(key).

for example,

I deploy a process model which has key "7d2fd2e7-98da-11ea-9a7e-7631c609be34“.

the act_re_procdef (key) created is “a” + "7d2fd2e7-98da-11ea-9a7e-7631c609be34“

Any help is appreciated.

i found this code pasted here.

I guess the key has been changed due to this line.

public byte[] getBpmnXML(BpmnModel bpmnModel) {
    for (Process process : bpmnModel.getProcesses()) {
        if (StringUtils.isNotEmpty(process.getId())) {
            char firstCharacter = process.getId().charAt(0);
            // no digit is allowed as first character
            if (Character.isDigit(firstCharacter)) {
                process.setId("a" + process.getId());
    byte[] xmlBytes = bpmnXMLConverter.convertToXML(bpmnModel);
    return xmlBytes;

Does anyone know how this is linked?

The key is stored in the XML as the id attribute of the <process element. In XML, this can’t start with a number, hence why this is added, I assume.