You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

hi guys

i have a problem in getting workflow variable in order to make history of approval proses

may be if it work will look like this (in textarea):

"-----------------------

issued date : 12-5-2011                                       <<< (activity 1)

Comment : cat, xxxxxxxxxxxx, approve

-------------------------

issued date : 12-5-2011                                       <<< (activity 2)

Comment : tony, xxxxxxxxxxxx, approve

-------------------------

issued date : 12-5-2011                                       <<< ?(activity 3)

Comment : tery, xxxxxxxxxxxx, revise

-------------------------

issued date : 12-5-2011                                       <<< ?(activity 2)

Comment : tony, xxxxxxxxxxxx, approve

-------------------------"

i still have a problem to set variable like above,

because when i try without form it works,

then the problem is when i try it with form, it wont works properly

especialy if activty is repeated again.

thanks

below is workflow

below, is using beanshel plugin and code

import org.joget.workflow.model.service.*;


try {

String value1 = new String("#variable.memo1#");

String value2 = new String("#variable.memo2#");
String datex = new String("#date. dd MM yyyy h:mm:ss#");

String memo2= "---------------"+ "\n" + "Issued Date : " + datex + "\n" + "Comment: " + value1 + "\n"+ value2 + "\n";

WorkflowManager wm = (WorkflowManager) pluginManager.getBean("workflowManager");
wm.activityVariable(workflowAssignment.getActivityId(),"memo2",memo2.toString());

// set variable memo1 = ""
String memo1= "";

WorkflowManager wm = (WorkflowManager) pluginManager.getBean("workflowManager");
wm.activityVariable(workflowAssignment.getActivityId(),"memo1",memo1.toString());



}
catch(NumberFormatException error)
{
System.out.println(error);
}
  • No labels