Hi Team,
I am getting this error - Cannot instantiate process definition testing:1:85607f56-6306-11ec-a7fe-080027e0c096: couldn’t execute activity <serviceTask id=“say-hello” …>: com.mysql.jdbc.Driver
Please help me
.Processing: process.zip…
process.bpmn (4.8 KB)
Source Inventory code is also here-
package anishinventory.testing;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
public class SourceInventory implements JavaDelegate {
private List inv1 = new ArrayList();
@Override
public void execute(DelegateExecution execution) throws Exception {
// TODO Auto-generated method stub
String url = “jdbc:mysql://localhost/inv”;
String user = “root”;
String pass = “37May@2154”;
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection(url, user, pass);
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("Select * from port where ProvisionStatus = 'Available'");
while(rs.next())
{
inv1.add(rs.getInt("PortID"));
}
int rollno = (int) execution.getVariable("RollNo");
if(inv1.contains(rollno))
{
System.out.println("Inventory found from source inventory");
execution.setVariable("inventoryfound", true);
}
else
{
execution.setVariable("inventoryfound", false);
}
}
}