Hi
What would be the right code to update the process state in the process model where the processState is an Enum field (Int)?
Here is my code that needs fine-tune:
import com.myapp.entity.proc.BidPriceQuoteComparative
def em = persistence.getEntityManager()
def e = em.find(BidPriceQuoteComparative.class, entityId)
e.setProcessState(60)
I am getting this error:
MissingMethodException: No signature of method: com.myapp.entity.proc.BidPriceQuoteComparative.setProcessState() is applicable for argument types: (Integer) values: [60]
Possible solutions: setProcessState(com.myapp.entity.ProcessState), getProcessState()
Tried (changed the code and deployed) and not working.
Here is the exception
com.haulmont.cuba.core.global.RemoteException:
---
org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: ProcessState for class: Script1
---
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: ProcessState for class: Script1
---
javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: ProcessState for class: Script1
---
groovy.lang.MissingPropertyException: No such property: ProcessState for class: Script1
at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:129)
at sun.reflect.GeneratedMethodAccessor2306.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)