How to add comment from action java code?
PostPosted:Sun Aug 03, 2014 7:47 am
hi!
I am using JBoss version 5 and openKm.
I execute add operation with workflow example but I have a problem:
The ERROR is:
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) );