• How to add comment from action java code?

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #29471  by majid
 
hi!
I am using JBoss version 5 and openKm.
I execute add operation with workflow example but I have a problem:
The ERROR is:
Application error
Class: org.hibernate.LazyInitializationException
Message: failed to lazily initialize a collection of role: org.jbpm.bytes.ByteArray.byteBlocks, no session or session was closed
Date: Sun Aug 03 00:39:10 PDT 2014
Code: Select all
private static final long serialVersionUID = 1L;

	@Override
	public void execute(ExecutionContext executionContext) throws Exception {
		// TODO Auto-generated method stub
		 Input num1 = (Input) executionContext.getContextInstance().getVariable("num1");
		 Input num2 = (Input) executionContext.getContextInstance().getVariable("num2");
		 
		 int r = Integer.valueOf( num1.getValue() ) + Integer.valueOf( num2.getValue() );
		 executionContext.getContextInstance().setVariable("result", r);
		 executionContext.getToken().addComment(String.valueOf(r) );

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.