5 Replies Latest reply on Aug 27, 2007 9:47 PM by (kumaresan)

    Workflow variables

      How to retrieve values of workflow process variables and modify those values using ES API?
        • 1. Re: Workflow variables
          Level 1
          Nearly every solution component in ES either reads from or writes to process variables. You can retrieve and modify these variables according to the design of each of these components; or if you want to read and modify variables according your own terms then the best component to use is "SetValue". It can be found in the "Foundation" service grouping.



          • 2. Re: Workflow variables
            Level 1
            Thanks.I have already use "SetValue" for assign PDF form data and modify those values.

            But I need to do this activity through JAVA API code?Please Give suggestion.
            • 3. Re: Workflow variables
              Level 1
              2 options are that you could add some script to an execute script step or write and deploy your own solution component.
              • 4. Re: Workflow variables
                Jasmin Charbonneau Level 4
                From a pure Java API point of view, you can use query manager to get the list of variables for a particular process. This is an example:

                public List getProcessVariables(String processName){
                List _result = null;
                _result = _queryManager.getProcessVariables(processName);
                catch(Exception e){
                System.out.println("Error in TaskManager getProcessVariables");
                return _result;

                You can also get the variables value for a particular process instance with the following code:

                public List getProcessVariablesValue(long processID){
                List procVar = null;

                try {

                procVar = _queryManager.getProcessVariableValues(processID);

                if(procVar == null) {
                System.out.println("No process variables");

                int size = procVar.size();
                for(int i = 0; i < size; i++){
                MultiTypeVariable var = ((MultiTypeVariable)procVar.get(i));
                System.out.println("name = " + var.getName());
                System.out.println("value = " + var.getValue());
                System.out.println("getTitle = " + var.getTitle());
                System.out.println("getType = " + var.getType());
                System.out.println("isSearchable = " + var.isSearchable());
                System.out.println("isVisible = " + var.isVisible());
                catch (Exception e) {
                return procVar;

                ... where _queryManager = TaskManagerClientFactory.getQueryManager(_factory);

                Hope this helps.

                • 5. Re: Workflow variables
                  Level 1
                  Thank you.