06-09-2017 09:05 PM
Hi All,
That is a simple question. I want to use transient variable in sub call activity process. When I try to pass through input parameters, the error appears (as expected because it is not a process var) ;
org.activiti.engine.ActivitiException: couldn't find a variable type that is able to serialize ...
06-11-2017 06:54 PM
By the way I have resolved this issue by debugging engine.
First I have tried to reach root process instance with;
ExecutionEntity thisEntity = (ExecutionEntity) execution;
ExecutionEntity pi= (ExecutionEntityImpl) thisEntity.getRootProcessInstance()
But getRootProcessInstance() method returns null within call activity process. While getRootProcessInstanceId() returns the exact root process instance ID. I take a look at getRootProcessInstance() method. It calls a function;
--> ExecutionEntityImpl.java
protected void ensureRootProcessInstanceInitialized() {
if (rootProcessInstanceId == null) {
rootProcessInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(rootProcessInstanceId);
}
}
I think this code should be;
if (rootProcessInstanceId != null)
Because I can reach root process instance in a Service Task (JavaDelegate class) by;
ExecutionEntity thisEntity = (ExecutionEntity) execution;
ExecutionEntity pi= (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(thisEntity.getRootProcessInstanceId());
So this weekend passed by thinking this issue
Best.
06-11-2017 06:54 PM
By the way I have resolved this issue by debugging engine.
First I have tried to reach root process instance with;
ExecutionEntity thisEntity = (ExecutionEntity) execution;
ExecutionEntity pi= (ExecutionEntityImpl) thisEntity.getRootProcessInstance()
But getRootProcessInstance() method returns null within call activity process. While getRootProcessInstanceId() returns the exact root process instance ID. I take a look at getRootProcessInstance() method. It calls a function;
--> ExecutionEntityImpl.java
protected void ensureRootProcessInstanceInitialized() {
if (rootProcessInstanceId == null) {
rootProcessInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(rootProcessInstanceId);
}
}
I think this code should be;
if (rootProcessInstanceId != null)
Because I can reach root process instance in a Service Task (JavaDelegate class) by;
ExecutionEntity thisEntity = (ExecutionEntity) execution;
ExecutionEntity pi= (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(thisEntity.getRootProcessInstanceId());
So this weekend passed by thinking this issue
Best.
Explore our Alfresco products with the links below. Use labels to filter content by product module.