Skip to content

Instantly share code, notes, and snippets.

@phowlett
phowlett / RestResponseFactory.java
Last active December 21, 2015 14:38
Fix to Activiti-Rest 5.13 RestResponseFactory.java - fixing createTaskResponse method so that JPA Entity variables can be retrieved.
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
@phowlett
phowlett / jpa-rest-process-variable.log
Created August 23, 2013 15:18
Failure and exception when retrieving a JPA Entity process variable via the Activiti (5.13) REST API - Task Collection (runtime/tasks?includeProcessVariables=true)
Aug 23, 2013 4:08:39 PM org.restlet.resource.UniformResource doCatch
WARNING: Exception or error caught in resource
java.lang.NullPointerException
at org.activiti.engine.impl.variable.JPAEntityMappings.findEntity(JPAEntityMappings.java:125)
at org.activiti.engine.impl.variable.JPAEntityMappings.getJPAEntity(JPAEntityMappings.java:121)
at org.activiti.engine.impl.variable.JPAEntityVariableType.getValue(JPAEntityVariableType.java:79)
at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(VariableInstanceEntity.java:165)
at org.activiti.engine.impl.persistence.entity.TaskEntity.getProcessVariables(TaskEntity.java:719)
at org.activiti.rest.api.RestResponseFactory.createTaskReponse(RestResponseFactory.java:133)
at org.activiti.rest.api.runtime.task.TaskPaginateList.processList(TaskPaginateList.java:42)