Aadav N [
https://community.jboss.org/people/aadav] created the discussion
"Re: jBPM-console - Oracle - start process"
To view the discussion, visit:
https://community.jboss.org/message/778241#778241
--------------------------------------------------------------
Hi bpmn2user,
To support the analysis, the code which I run as (web-app). Yes its the sample webapp you
shared long back.
***if
**
(action.equals("CreateProcess")) {
UserTransaction ut = (UserTransaction)
**new** InitialContext().lookup( "java:comp/UserTransaction" );ut.begin();
StatefulKnowledgeSession ksession = JbpmAPIUtil.+getSession+();
Map<String, Object> params =
**new** HashMap<String, Object>();params.put(
"priority", "High");params.put(
"modelNumber", "123"); params.put(
"quantity", "66");
ksession.startProcess(
"com.sample.bpmn.user",params);
ksession.fireAllRules();
ut.commit();
request.setAttribute(
"message", "Process Created!");
TaskClient client =
**new** TaskClient(**new** MinaTaskClientConnector("mina", **new**
MinaTaskClientHandler(SystemEventListenerFactory.+getSystemEventListener+())));
**try**{
client.connect(
"127.0.0.1", 9123); BlockingTaskSummaryResponseHandler summaryHandler =
**new** BlockingTaskSummaryResponseHandler(); client.getTasksAssignedAsPotentialOwner(
"mina", "en-UK", summaryHandler);List<TaskSummary> tasks =
summaryHandler.getResults();
TaskSummary task =
**null**;
**for** (TaskSummary taskSummary : tasks){
System.
++out++.println(taskSummary.getId() + " : " + taskSummary.getName()); task =
taskSummary;}
}
**catch**(Exception e){
}
RequestDispatcher rD = request.getRequestDispatcher(
"adminuser.jsp");rD.forward(request, response);
}
*
Thanks,
Aadav
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/778241#778241]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]