Hi, thank you for your answer.
You said that "…as process instance variable from your service task", did you mean script task?
Maybe I was unclear in my question.
What I want to do is when I reach the scriptTask in my process I want to insert values into the database. The values to be inserted is received from an email which I've read in a Java class and it is these values that I want to insert as soon as the execution is at my scriptTask.
From my java class I want to do something like:
Execution execution = runtimeService.createExecutionQuery()
.processInstanceId(pi.getId())
.activityId("ScriptState")
.singleResult();
runtimeService.signal(execution.getId(), varToInsert);
And in my scriptTask i need something like:
importPackage(java.sql);
importPackage(java.lang);
importPackage(org.activiti.explorer.reporting);
var p = ReportingUtil.getCurrentDatabaseConnection().prepareStatement("INSERT INTO risk VALUES (?, ?, ?)");
p.setString(1, ${id});
p.setString(2, ${name});
p.setString(3, ${answer]);
p.executeUpdate();
…
Anyone?
Regards,