Is there a way to read the Workflow variable in the JavaBean plugin with the workflowmanager API? I do NOT want to use #variable.MyWorkflowVar# because I have some characters (return chars and quotes) in the variable that will mess up something like String mystring = "#variable.MyWorkflowVar#";

Thanks.

  • No labels

2 Comments

  1. Hi Paul,

    Yes, below is the example for your reference.

    import org.joget.workflow.model.service.*;
    
    WorkflowManager wm = (WorkflowManager) pluginManager.getBean("workflowManager");
    String value = wm.getProcessVariable(workflowAssignment.getProcessId(), "variableId");
    
    System.out.println(value);

    Hope it's help.

    Regards,

    Owen

    1. Thanks! This worked great!