Inline evaluation error in OpenKM 5.1.8
PostPosted:Fri Sep 11, 2015 10:12 am
Hi,
I used the below to script in Scripting Tab and got some errors. Below are the details
Scripts:
Error:
So please help me on how to solve this error.
Thanks in Advance.
I used the below to script in Scripting Tab and got some errors. Below are the details
Scripts:
Code: Select all
import javax.jcr.*;
import com.openkm.core.*;
import com.openkm.bean.*;
import com.openkm.api.OKMDocument;
String userID = session.getUserID();
//if (userID.equals("okmAdmin"))
// return; // RRRRRRRRRRRRRRRRRRRRRRReturn
String startPrefix = "2012AP";
int lengthOfPrefix = startPrefix.length();
int lengthOfDocPrefix = 10; // 2012APnnnn
String parentDir = com.openkm.util.FileUtils.getParent(eventNode.getPath());Error:
Code: Select all
Sourced file: inline evaluation of: ``import javax.jcr.*; import com.openkm.core.*; import com.openkm.bean.*; impor . . . '' : Typed variable declaration : Attempt to resolve method: getUserID() on undefined variable or class name: session : at Line: 6 : in file: inline evaluation of: ``import javax.jcr.*; import com.openkm.core.*; import com.openkm.bean.*; impor . . . '' : session .getUserID ( )So please help me on how to solve this error.
Thanks in Advance.