Skip to content

Commit aa76ec2

Browse files
authored
Merge pull request #662 from NitorCreations/fix-oracle-itest-error
Fix Oracle integration tests
2 parents 52ec69f + 6fdffc3 commit aa76ec2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

nflow-engine/src/main/java/io/nflow/engine/internal/dao/WorkflowInstanceDao.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,17 @@ public void updateWorkflowInstanceAfterExecution(WorkflowInstance instance, Work
354354
public int updateWorkflowInstance(WorkflowInstance instance) {
355355
// using sqlVariants.nextActivationUpdate() requires that nextActivation is used 3 times
356356
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);
361368
if (updated == 0) {
362369
logger.warn(
363370
"Updating workflow instance {} did not update any rows in the database, instance may have been recovered by another executor.",

0 commit comments

Comments
 (0)