@Override public Serializable get(Object key) { if(WorkflowModel.PROP_DUE_DATE.equals(key)) { return getDueDate(); return getPriority(); return getCreated(); return getOwner(); return getId();
@Override public Serializable get(Object key) { if(WorkflowModel.PROP_DUE_DATE.equals(key)) { return getDueDate(); return getPriority(); return getCreated(); return getOwner(); return getId();
@SuppressWarnings("deprecation") public LazyActivitiWorkflowTask(HistoricTaskInstance historicTask, ActivitiTypeConverter typeConverter, TenantService tenantService) { super(BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, historicTask.getId()), null, null, null, null, null, null, null); this.historicTask = historicTask; this.activitiTypeConverter = typeConverter; this.lazyPropertiesMap = new LazyPropertiesMap(); // Fetch task-definition and a partially-initialized WorkflowTask (not including properties and path) WorkflowTaskDefinition taskDefinition = activitiTypeConverter.getTaskDefinition(historicTask.getTaskDefinitionKey(), historicTask.getProcessDefinitionId()); String workflowDefinitionName = activitiTypeConverter.getWorkflowDefinitionName(historicTask.getProcessDefinitionId()); workflowDefinitionName = tenantService.getBaseName(workflowDefinitionName); WorkflowTask partiallyInitialized = typeConverter.getWorkflowObjectFactory().createTask(historicTask.getId(), taskDefinition, taskDefinition.getId(), historicTask.getName(), historicTask.getDescription(), WorkflowTaskState.COMPLETED, null, workflowDefinitionName , lazyPropertiesMap); this.definition = taskDefinition; this.name = taskDefinition.getId(); this.title = partiallyInitialized.getTitle(); this.description = partiallyInitialized.getDescription(); this.state = partiallyInitialized.getState(); }
@SuppressWarnings("deprecation") public LazyActivitiWorkflowTask(HistoricTaskInstance historicTask, ActivitiTypeConverter typeConverter, TenantService tenantService) { super(BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, historicTask.getId()), null, null, null, null, null, null, null); this.historicTask = historicTask; this.activitiTypeConverter = typeConverter; this.lazyPropertiesMap = new LazyPropertiesMap(); // Fetch task-definition and a partially-initialized WorkflowTask (not including properties and path) WorkflowTaskDefinition taskDefinition = activitiTypeConverter.getTaskDefinition(historicTask.getTaskDefinitionKey(), historicTask.getProcessDefinitionId()); String workflowDefinitionName = activitiTypeConverter.getWorkflowDefinitionName(historicTask.getProcessDefinitionId()); workflowDefinitionName = tenantService.getBaseName(workflowDefinitionName); WorkflowTask partiallyInitialized = typeConverter.getWorkflowObjectFactory().createTask(historicTask.getId(), taskDefinition, taskDefinition.getId(), historicTask.getName(), historicTask.getDescription(), WorkflowTaskState.COMPLETED, null, workflowDefinitionName , lazyPropertiesMap); this.definition = taskDefinition; this.name = taskDefinition.getId(); this.title = partiallyInitialized.getTitle(); this.description = partiallyInitialized.getDescription(); this.state = partiallyInitialized.getState(); }
@SuppressWarnings("deprecation") public LazyActivitiWorkflowTask(Task task, ActivitiTypeConverter typeConverter, TenantService tenantService, String workflowDefinitionName) { super(BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, task.getId()), null, null, null, null, null, null, null); this.task = task; this.activitiTypeConverter = typeConverter; this.lazyPropertiesMap = new LazyPropertiesMap(); // Fetch task-definition and a partially-initialized WorkflowTask (not including properties and path) WorkflowTaskDefinition taskDefinition = activitiTypeConverter.getTaskDefinition(task); WorkflowTask partiallyInitialized = typeConverter.getWorkflowObjectFactory().createTask(task.getId(), taskDefinition, taskDefinition.getId(), task.getName(), task.getDescription(), WorkflowTaskState.IN_PROGRESS, null, workflowDefinitionName , lazyPropertiesMap); this.definition = taskDefinition; this.name = taskDefinition.getId(); this.title = partiallyInitialized.getTitle(); this.description = partiallyInitialized.getDescription(); this.state = partiallyInitialized.getState(); }
@SuppressWarnings("deprecation") public LazyActivitiWorkflowTask(Task task, ActivitiTypeConverter typeConverter, TenantService tenantService, String workflowDefinitionName) { super(BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, task.getId()), null, null, null, null, null, null, null); this.task = task; this.activitiTypeConverter = typeConverter; this.lazyPropertiesMap = new LazyPropertiesMap(); // Fetch task-definition and a partially-initialized WorkflowTask (not including properties and path) WorkflowTaskDefinition taskDefinition = activitiTypeConverter.getTaskDefinition(task); WorkflowTask partiallyInitialized = typeConverter.getWorkflowObjectFactory().createTask(task.getId(), taskDefinition, taskDefinition.getId(), task.getName(), task.getDescription(), WorkflowTaskState.IN_PROGRESS, null, workflowDefinitionName , lazyPropertiesMap); this.definition = taskDefinition; this.name = taskDefinition.getId(); this.title = partiallyInitialized.getTitle(); this.description = partiallyInitialized.getDescription(); this.state = partiallyInitialized.getState(); }