当前位置: 首页>>代码示例>>Java>>正文


Java ExecutionEntity.setId方法代码示例

本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.setId方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.setId方法的具体用法?Java ExecutionEntity.setId怎么用?Java ExecutionEntity.setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity的用法示例。


在下文中一共展示了ExecutionEntity.setId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public ExecutionEntity read(GettableData data) {
  ExecutionEntity executionEntity = new ExecutionEntity();
  executionEntity.setId(data.getString("id"));
  executionEntity.setProcessInstanceId(data.getString("proc_inst_id"));
  executionEntity.setParentId(data.getString("parent_id"));
  executionEntity.setProcessDefinitionId(data.getString("proc_def_id"));
  executionEntity.setSuperExecutionId(data.getString("super_exec"));
  executionEntity.setSuperCaseExecutionId(data.getString("super_case_exec"));
  executionEntity.setCaseInstanceId(data.getString("case_inst_id"));
  executionEntity.setActivityInstanceId(data.getString("act_inst_id"));
  executionEntity.setActivityId(data.getString("act_id"));
  executionEntity.setActive(data.getBool("is_active"));
  executionEntity.setConcurrent(data.getBool("is_concurrent"));
  executionEntity.setScope(data.getBool("is_scope"));
  executionEntity.setEventScope(data.getBool("is_event_scope"));
  executionEntity.setSuspensionState(data.getInt("suspension_state"));
  executionEntity.setCachedEntityState(data.getInt("cached_ent_state"));
  executionEntity.setSequenceCounter(data.getLong("sequence_counter"));

  return executionEntity;
}
 
开发者ID:camunda,项目名称:camunda-engine-cassandra,代码行数:22,代码来源:ExecutionEntitySerializer.java

示例2: execute

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public void execute(DelegateExecution execution) throws Exception {
  String existingId = execution.getId();

  // insert an execution referencing the current execution

  ExecutionEntity newExecution = new ExecutionEntity();
  newExecution.setId("someId");
  newExecution.setParentId(existingId);

  DbEntityOperation insertOperation = new DbEntityOperation();
  insertOperation.setOperationType(DbOperationType.INSERT);
  insertOperation.setEntity(newExecution);

  Context.getCommandContext()
    .getDbSqlSession()
    .executeDbOperation(insertOperation);

}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:19,代码来源:ViolateIntegrityConstraintDelegate.java

示例3: execute

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void execute(DelegateExecution execution) throws Exception {
  ExecutionEntity execution1 = new ExecutionEntity();
  execution1.setId(ENTITY_ID1);
  execution1.setExecutions(new ArrayList<ExecutionEntity>());

  ExecutionEntity execution2 = new ExecutionEntity();
  execution2.setId(ENTITY_ID2);
  execution2.setExecutions(new ArrayList<ExecutionEntity>());
  execution2.setParent(execution1);

  ExecutionManager executionManager = Context.getCommandContext().getExecutionManager();
  executionManager.insert(execution1);
  executionManager.insert(execution2);

  executionThreadControl.sync();

}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:19,代码来源:ReuseEntityCacheTest.java

示例4: testRestoreProcessInstance

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Test
public void testRestoreProcessInstance() {
  //given parent execution
  List<ExecutionEntity> entities = new ArrayList<ExecutionEntity>();
  ExecutionEntity parent = new ExecutionEntity();
  parent.setId("parent");
  entities.add(parent);
  //when restore process instance is called
  parent.restoreProcessInstance(entities, null, null, null, null, null, null);
  //then no problem should occure

  //when child is added and restore is called again
  ExecutionEntity entity = new ExecutionEntity();
  entity.setId("child");
  entity.setParentId(parent.getId());
  entities.add(entity);

  parent.restoreProcessInstance(entities, null, null, null, null, null, null);
  //then again no problem should occure

  //when parent is deleted from the list
  entities.remove(parent);

  //then exception is thrown because child reference to parent which does not exist anymore
  thrown.expect(ProcessEngineException.class);
  thrown.expectMessage("Cannot resolve parent with id 'parent' of execution 'child', perhaps it was deleted in the meantime");
  parent.restoreProcessInstance(entities, null, null, null, null, null, null);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:29,代码来源:ExecutionEntityTest.java

示例5: setup

import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Before
public void setup() {
  TestIdGenerator idGenerator = new TestIdGenerator();
  entityManager = new ExposingDbEntityManager(idGenerator, null);

  execution1 = new ExecutionEntity();
  execution1.setId("101");
  execution2 = new ExecutionEntity();
  execution2.setId("102");
  execution3 = new ExecutionEntity();
  execution3.setId("103");
  execution4 = new ExecutionEntity();
  execution4.setId("104");
  execution5 = new ExecutionEntity();
  execution5.setId("105");
  execution6 = new ExecutionEntity();
  execution6.setId("106");
  execution7 = new ExecutionEntity();
  execution7.setId("107");
  execution8 = new ExecutionEntity();
  execution8.setId("108");

  task1 = new TaskEntity();
  task1.setId("104");
  task2 = new TaskEntity();
  task2.setId("105");
  task3 = new TaskEntity();
  task3.setId("106");
  task4 = new TaskEntity();
  task4.setId("107");

  variable1 = new VariableInstanceEntity();
  variable1.setId("108");
  variable2 = new VariableInstanceEntity();
  variable2.setId("109");
  variable3 = new VariableInstanceEntity();
  variable3.setId("110");
  variable4 = new VariableInstanceEntity();
  variable4.setId("111");
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:41,代码来源:DbOperationsOrderingTest.java


注:本文中的org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.setId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。