Hi,
I am creating a groovy function below from Development->Manage Groovy script...->Create... and the function runs properly although it returns NULL.
Now I would like to have access to that function in the function list of the groovy script expression editor. I can't see my function in the user defined category at the moment. How does this work?
import groovy.sql.Sql
def function_name(p_SCENARIO_ID){
def process_status =""
def process_id =-1
def message = "no run"
def sql = Sql.newInstance("jdbc:oracle:thin:@LOCALHOST:1521:ORCL", "username", "pwd", "oracle.jdbc.driver.OracleDriver")
sql.call("{call Package_name.test_procedure_in_out(?,?,?,?)}", [p_SCENARIO_ID,Sql.VARCHAR,Sql.INTEGER,Sql.VARCHAR])
{
pid, ps, m ->
process_id=pid
process_status=ps
message=m
}
sql.close()
return message
}
I'm using Bonita BPM 6.2.2 Community on Tomcat 6/windows 2008R2 JRE6.