Java Code Examples for org.camunda.bpm.engine.runtime.VariableInstance#getActivityInstanceId()

The following examples show how to use org.camunda.bpm.engine.runtime.VariableInstance#getActivityInstanceId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DelegateCaseVariableInstanceImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static DelegateCaseVariableInstanceImpl fromVariableInstance(VariableInstance variableInstance) {
  DelegateCaseVariableInstanceImpl delegateInstance = new DelegateCaseVariableInstanceImpl();
  delegateInstance.variableId = variableInstance.getId();
  delegateInstance.processDefinitionId = variableInstance.getProcessDefinitionId();
  delegateInstance.processInstanceId = variableInstance.getProcessInstanceId();
  delegateInstance.executionId = variableInstance.getExecutionId();
  delegateInstance.caseExecutionId = variableInstance.getCaseExecutionId();
  delegateInstance.caseInstanceId = variableInstance.getCaseInstanceId();
  delegateInstance.taskId = variableInstance.getTaskId();
  delegateInstance.activityInstanceId = variableInstance.getActivityInstanceId();
  delegateInstance.tenantId = variableInstance.getTenantId();
  delegateInstance.errorMessage = variableInstance.getErrorMessage();
  delegateInstance.name = variableInstance.getName();
  delegateInstance.value = variableInstance.getTypedValue();

  return delegateInstance;
}
 
Example 2
Source File: VariableInstanceDto.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static VariableInstanceDto fromVariableInstance(VariableInstance variableInstance) {
  VariableInstanceDto dto = new VariableInstanceDto();

  dto.id = variableInstance.getId();
  dto.name = variableInstance.getName();
  dto.processDefinitionId = variableInstance.getProcessDefinitionId();
  dto.processInstanceId = variableInstance.getProcessInstanceId();
  dto.executionId = variableInstance.getExecutionId();

  dto.caseExecutionId = variableInstance.getCaseExecutionId();
  dto.caseInstanceId = variableInstance.getCaseInstanceId();

  dto.taskId = variableInstance.getTaskId();
  dto.activityInstanceId = variableInstance.getActivityInstanceId();

  dto.tenantId = variableInstance.getTenantId();

  if(variableInstance.getErrorMessage() == null) {
    VariableValueDto.fromTypedValue(dto, variableInstance.getTypedValue());
  }
  else {
    dto.errorMessage = variableInstance.getErrorMessage();
    dto.type = VariableValueDto.toRestApiTypeName(variableInstance.getTypeName());
  }

  return dto;
}