cancel
Showing results for 
Search instead for 
Did you mean: 

Insert Variables To InActive WOrkflows

surajpr
Champ in-the-making
Champ in-the-making
Hi All,

Is their any possibility to insert variables to act_hi_varinst using API once the workflow is inactive?,
when workflow is active we use "runtimeService.setVariables(processInstanceId, attributesMap)" but in my case since workflow is inactive we cannot use runtimeService.

If API does not allow us to insert variables once workflow is inactive can we manually insert entries to act_hi_varinst, If we are allowed to
insert entries into act_hi_varinst manually what should we insert into columns "id_" and "execution_id_". and Is this the only table that should be inserted with variables or should we insert any entries to any other table?

And inserting manually to act_hi_varinst would cause any issue?

Please help me with this issue. Thanks in advance.
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
> Is their any possibility to insert variables to act_hi_varinst using API once the workflow is inactive?,

No, the history table are for 'audit purposes', so no API will allow you to change it.

However, you can write your own command and execute it via the managementService.executeCommand() method. There, you can get the entityManager for HistoricActivityInstance and insert/change all you like.

> And inserting manually to act_hi_varinst would cause any issue?

No, except changing your audit data…

surajpr
Champ in-the-making
Champ in-the-making
Thanks a lot jbarrez for quick response….