Skip to content

Instantly share code, notes, and snippets.

View motorina0's full-sized avatar

Vlad Stan motorina0

View GitHub Profile
List<HistoricActivityInstance> processSteps = nativeHistoricActivityInstanceQuery
.sql("select RES.* from `activiti`.`ACT_HI_ACTINST` RES" + " WHERE RES.PROC_INST_ID_ = \"30\"").list();
@motorina0
motorina0 / gist:60e00d236953970cd53619f3891df549
Created November 15, 2016 15:55
historicActivityInstanceQuery.processInstanceId
List<HistoricActivityInstance> processSteps = historicActivityInstanceQuery.processInstanceId(processInstanceId).list();
@motorina0
motorina0 / gist:0014ec1155ad66597f9088c6008708d7
Created November 15, 2016 15:58
historicActivityInstanceQuery.processInstanceId(processInstanceId).count()
long stepCountForProcess = historicActivityInstanceQuery.processInstanceId(processInstanceId).count();
List<HistoricActivityInstance> runningSteps = historicActivityInstanceQuery
.processInstanceId(processInstanceId)
.unfinished()
.orderByHistoricActivityInstanceStartTime()
.desc()
.list();
@motorina0
motorina0 / gist:6446ff4cd277ebd74e57f760f0709a01
Last active November 15, 2016 18:31
taskService.setVariable
taskService.setVariable(firstTask.getId(), "variable1", "value1");
taskService.setVariable(firstTask.getId(), "variable1", "value2");
taskService.setVariable(firstTask.getId(), "variable1", "value3");
List<HistoricDetail> resultSet = historicDetailQuery.taskId(firstTask.getId()).variableUpdates().orderByTime().asc().list();
HistoricTaskInstance hti = historicTaskInstanceQuery
.taskAssignee("gonzo")
.taskCreatedAfter(firstOfNovember)
.singleResult();
List<HistoricVariableInstance> variables = historicVariableInstanceQuery.variableName("variable1").list();
List<HistoricActivityInstance> processSteps = nativeHistoricActivityInstanceQuery
.sql("select RES.* from `activiti`.`ACT_HI_ACTINST` RES" + " WHERE RES.PROC_INST_ID_ = \"30\"").list();
List<HistoricActivityInstance> processSteps = nativeHistoricActivityInstanceQuery.sql("SELECT `ID_` , `PROC_INST_ID_`, `PROC_DEF_ID_`, `START_TIME_`, `END_TIME_`, `DURATION_`, `START_USER_ID_`, `START_ACT_ID_` as `ACT_ID_` , `END_ACT_ID_`, `NAME_` as `ACT_NAME_` FROM `activiti`.`ACT_HI_PROCINST` LIMIT 1000;").list();