1
0
-1

Hai, i have facing with workflow variable when the process already run. Can i change or edit the workflow variable? 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1
      Hi Fattah, You can using tool, add a tool in your process and at map tools to plugin add bean shell to your tool this simple code
      import org.joget.apps.app.service.AppUtil;
      import org.joget.workflow.model.service.*;
      public void changeWV(){
                      WorkflowManager wm = (WorkflowManager) pluginManager.getBean("workflowManager");
                      wm.activityVariable(workflowAssignment.getActivityId(), "yourVariable", "newValue");
      }
      return changeWV();
      good luck
      1. abdul Fattah

        it is can work is the "newValue" need to calculate first before go to that value?

      2. Muhammad Khafidz

        You can get exist value of workflow variable use hash variable #variable.yourVariable#

      3. abdul Fattah

        okay i will try it. thank you bro.

      4. abdul Fattah

        but i need to reevaluate first the process right?

      CommentAdd your comment...