Does anyone know how to cast the return of method getRunningValue of a ProcessVa

Does anyone know how to cast the return of method getRunningValue of a ProcessVariableInstance object to a CDT? I am getting the ProcessVariableInstance and its instanceType is my CDT. I have imported the CDT into Eclipse. But i am getting a ClassCastException when i try to do the following:

ProcessVariableInstance pviProposal = pes.getProcessVariable(process.getId(), "proposal");
Proposal proposal = (Proposal) pviProposal.getRunningValue();

Thank a lot...

OriginalPostID-97898

OriginalPostID-97898

  Discussion posts and replies are publicly visible

Parents
  • Yes, the function is not installed at all. Am just retrieving process variable values (of a process) by getRunningValue(). Am not sure what could be the return type of my function in this case, becuase i dont know what would be the type of process variable.
    Even I tried by keeping "String" as return type of the function. Still getting above "@Type" annotation error.
    Could you tell how to configure @Type for primitives (whatever you said is for CDT's)
Reply
  • Yes, the function is not installed at all. Am just retrieving process variable values (of a process) by getRunningValue(). Am not sure what could be the return type of my function in this case, becuase i dont know what would be the type of process variable.
    Even I tried by keeping "String" as return type of the function. Still getting above "@Type" annotation error.
    Could you tell how to configure @Type for primitives (whatever you said is for CDT's)
Children
No Data