@@ -354,10 +354,17 @@ public void updateWorkflowInstanceAfterExecution(WorkflowInstance instance, Work
354
354
public int updateWorkflowInstance (WorkflowInstance instance ) {
355
355
// using sqlVariants.nextActivationUpdate() requires that nextActivation is used 3 times
356
356
Object nextActivation = sqlVariants .toTimestampObject (instance .nextActivation );
357
- int updated = jdbc .update (updateWorkflowInstanceSql (), instance .status .name (), instance .state ,
358
- abbreviate (instance .stateText , getInstanceStateTextLength ()), nextActivation , nextActivation , nextActivation ,
359
- instance .status == executing ? executorInfo .getExecutorId () : null , instance .retries , instance .businessKey ,
360
- toTimestamp (instance .started ), instance .id );
357
+ Object [] params = {
358
+ instance .status .name (), instance .state , abbreviate (instance .stateText , getInstanceStateTextLength ()),
359
+ nextActivation , nextActivation , nextActivation ,
360
+ instance .status == executing ? executorInfo .getExecutorId () : null , instance .retries , instance .businessKey ,
361
+ sqlVariants .toTimestampObject (instance .started ), instance .id
362
+ };
363
+ int [] sqlTypes = {
364
+ Types .VARCHAR , Types .VARCHAR , Types .VARCHAR , Types .TIMESTAMP , Types .TIMESTAMP , Types .TIMESTAMP ,
365
+ Types .INTEGER , Types .INTEGER , Types .VARCHAR , Types .TIMESTAMP , Types .INTEGER
366
+ };
367
+ int updated = jdbc .update (updateWorkflowInstanceSql (), params , sqlTypes );
361
368
if (updated == 0 ) {
362
369
logger .warn (
363
370
"Updating workflow instance {} did not update any rows in the database, instance may have been recovered by another executor." ,
0 commit comments