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 ...
Solved! Go to Solution.
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.
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.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.