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
  • Thanks for your help mimar.
    Actually am just trying to return the o/p of getRunningValue(), but facing below error:
    ---------
    'The Function Module com.appian.pkg.GetProcessVariables could not be installed due to invalid type: Invalid Type: Unable to determine type with QName of [{http://www.appian.com/ae/types/2009}Long]. Use the @Type annotation to indicate the type of a function parameter. The deprecated ’type’ attribute for the @Parameter annotation has been removed
    ---------
    If you know, could you tell me how to define Type attribute in case of "Primitive return types" and "CDT's".
Reply
  • Thanks for your help mimar.
    Actually am just trying to return the o/p of getRunningValue(), but facing below error:
    ---------
    'The Function Module com.appian.pkg.GetProcessVariables could not be installed due to invalid type: Invalid Type: Unable to determine type with QName of [{http://www.appian.com/ae/types/2009}Long]. Use the @Type annotation to indicate the type of a function parameter. The deprecated ’type’ attribute for the @Parameter annotation has been removed
    ---------
    If you know, could you tell me how to define Type attribute in case of "Primitive return types" and "CDT's".
Children
No Data