Page 1 of 1

jboss codes

PostPosted:Tue Jan 03, 2017 1:19 am
by jimac
Hi!

Is there a tutorial or guide in jboss codes??
I don't understand how the code is constructed.

For example, I don't know how this code is constructed.
Code: Select all
String systemToken = DbSessionManager.getInstance().getSystemToken();
OKMDocument.getInstance().move(systemToken, "/okm:root/doc1.PDF", "/okm:root/folder1);
for what is the systemToken, getInstance() and the DbSessionManager?

Thanks[/b]

Re: JBoss codes

PostPosted:Wed Jan 04, 2017 10:29 am
by jllort
Workflow execution is done under non OpenKM user session, then when executing OpenKM code inside workflow must operate with some user ( otherwise will be raised an error). In almost cases the best option is using "system" user. In this piece of code we are getting the token of the user system ( unique session id for system token ) what helps to work as user system.

Hope this will give some light to you.