Hi together!
I'm trying to get a connection to mysql db by a script task (javascript). Is there any possibility?
My problem with the store entity task is that it is a way too unflexible. I need more dynamic functionality in my process because I have more user tasks with different form und fields. The dynamic dream will be that I have only one script task where I can update all of my variables.
I tried it on this way: (but it says an error -- require not found! Is it because activiti doesn't support node.js?)
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "yourusername",
password: "yourpassword",
database: "mydb"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
var sql = "INSERT INTO customers (name, address) VALUES ('Company Inc', 'Highway 37')";
con.query(sql, function (err, result) {
if (err) throw err;
});
});
Is there any way to use the data models like this? Otherwise the data models in activiti is not really usable for my complex processes...
Thanks a lot for your informations!
Best regard,
Patrick
Have you tried a service task instead? I'm trying to do some research on this for you.
Hi jljwoznica,
thanks for your answer. I will give it a try with the service task.
Thanks,
Patrick
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.