[JBoss Portal] - Empty Portlet Displaying.
by HemanthKota
Hi,
I have devoloped a simple portlet with a single controller and the single JSP page. In command prompt i am getting the message as "Successfully Deployed", but in browser i am seeing the empty portlet. i,e portlet with min, max buttons. I am providing the controller, jsp and *-portlet.xml. Please provide some solution to it.
The JSP code:
------------------
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ taglib prefix="portlet" uri="/WEB-INF/tld/portlet.tld" %>
<fmt:message key="title"/>
<h2>Welcome</h2>
U logged in at: <c:out value="${model.now}"/>
Controllet Code
--------------------
mport java.util.HashMap;
import java.util.Map;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.springframework.web.portlet.SimplePortletFormController;
import org.springframework.web.servlet.ModelAndView;
public class BasicInfoViewController extends SimplePortletFormController {
/**
* @see org.springframework.web.portlet.support.PortletController#handleRequest(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
*/
public ModelAndView handleRequest(RenderRequest request, RenderResponse response) throws Exception {
String now = (new java.util.Date()).toString();
Map myModel = new HashMap();
myModel.put("now", now);
return new ModelAndView(this.getFormView(), "model", myModel);
}
/**
* @see org.springframework.web.portlet.support.PortletController#handleRequest(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
*/
public void handleRequest(ActionRequest request, ActionResponse response) throws Exception {
}
}
*-portlet.xml
---------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!-- Logical view resolver -->
false
org.springframework.web.servlet.view.JstlView
/WEB-INF/jsp/
.jsp
<!-- mapping of portlet modes to view controllers -->
<!-- "view" portlet mode controller -->
main
Thanks in advance,
Hemanth
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976516#3976516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976516
19 years, 7 months
[JBoss jBPM] - Re: Regarding process variables
by jagadeeshrao
Hi,
In JBPM_VARAIABLEINSTANCE database table, there is feild called CLASS_.
What is the meaning of that field. If execute processinstace as per code in the previous post , the program is creating total 6 variables and inserting into JBPM_VARAIABLEINSTANCE table. The program is not assigning the values to the variables present in the proccess definition. It's creating new varibles with same names and assigning values passed as input through .setVariable(); . after that if we see the table JBPM_VARAIABLEINSTANCE we can find 6 variable , 3 with CLASS_ type
"N" and three with CLASS_ "S" . But, I am getting value for only CLASS_ type "S". CLASS_ type variables "N" have null values.
Why I am getting duplicate values? What are CLASS_ type N and S?
Please guide me.
Thanks
Jagadeesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976514#3976514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976514
19 years, 7 months
[JBoss jBPM] - how create swimlane
by antitrust1982
Hello,
I have created a jbpm portlet. For now I have use this code in order to do working the swimlane assigment:
package com.opensymphony.webwork.portlet.tutorial;
|
| import java.util.*;
|
|
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ExecutionContext;
| import org.jbpm.graph.exe.ProcessInstance;
| import org.jbpm.db.*;
| import org.jbpm.graph.exe.Token;
| import org.jbpm.taskmgmt.exe.*;
| import org.jbpm.taskmgmt.log.SwimlaneAssignLog;
| import org.jbpm.taskmgmt.log.SwimlaneCreateLog;
| import org.jbpm.taskmgmt.log.SwimlaneLog;
| import org.jbpm.taskmgmt.log.TaskAssignLog;
| import org.jbpm.graph.exe.*;
| import org.jbpm.graph.log.TokenCreateLog;
|
| import com.opensymphony.xwork.ActionContext;
| import com.opensymphony.xwork.ActionSupport;
| import org.jbpm.*;
|
| import org.jbpm.taskmgmt.def.*;
|
| import org.jbpm.ant.StartHsqldbTask;
| import org.jbpm.context.log.*;
|
| import java.util.Iterator;
|
| public class CreateProcessInstanceAction extends ActionSupport{
|
| TaskInstance taskinstance=null;
| static JbpmConfiguration jbpmConfiguration = null;
| static ProcessDefinition processDefinition= null;
| Date date;
|
| JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
| GraphSession graphSession = jbpmContext.getGraphSession();
| SwimlaneInstance si =null;
| ExecutionContext ec=null;
| private long processus;
|
| public long getProcessus() {
| return processus;
| }
| public void setProcessus(long processus) {
| System.out.println("set process");
| this.processus = processus;
| }
|
|
| @Override
| public String execute() throws Exception {
| Map session1 = (Map) ActionContext.getContext().get("session");
| String login=(String) session1.get("login");
| System.out.println("mon login:"+login);
| Collection processdefinstances= graphSession.findAllProcessDefinitions();
| Iterator itpro = processdefinstances.iterator();
| while (itpro.hasNext()){
| ProcessDefinition processdef =(ProcessDefinition) itpro.next();
| if(processus == processdef.getId()){
| ProcessInstance processinstance= processdef.createProcessInstance();
| jbpmContext.save(processinstance);
| jbpmContext.loadProcessInstanceForUpdate(processinstance.getId());
|
|
| Map swimlanes = processdef.getTaskMgmtDefinition().getSwimlanes();
| Iterator itr = swimlanes.keySet().iterator();
| while(itr.hasNext()) {
| Swimlane swimlane = (Swimlane)swimlanes.get(itr.next());
| swimlane.setPooledActorsExpression(login);
| ec= new ExecutionContext(processinstance.getRootToken());
| SwimlaneInstance swi = processinstance.getTaskMgmtInstance().getInitializedSwimlaneInstance(ec, swimlane);
|
| /*if(swi.getName().equals("Assurimo")){
| swi.setActorId("bert");
| }*/
|
| Set pooledActors = swi.getPooledActors();
| if(pooledActors != null) {
| Iterator paItr = pooledActors.iterator();
| while(paItr.hasNext()) {
| ((PooledActor)paItr.next() ).setSwimlaneInstance(swi);
| }
| }
|
| }
|
| if (processdef.getTaskMgmtDefinition().getStartTask() != null) {
|
| org.jbpm.taskmgmt.def.Task task = processdef.getTaskMgmtDefinition().getStartTask();
| String swimlaneName = task.getSwimlane().getName();
| SwimlaneInstance swi = processinstance.getTaskMgmtInstance().getSwimlaneInstance(swimlaneName);
| String originalActorId = swi.getActorId();
| Set originalPooledActors = swi.getPooledActors();
| System.out.println("taskinstance");
| TaskInstance startTask = processinstance.getTaskMgmtInstance().createStartTaskInstance();
| startTask.setActorId(login);
| startTask.setDueDate(date);
|
| if(startTask.getSwimlaneInstance() != null) {
| si = startTask.getSwimlaneInstance();
| startTask.getSwimlaneInstance().setActorId(login);
|
| if (startTask.getSwimlaneInstance().getPooledActors() != null) {
|
| }
| }
|
| }
| else {
| }
|
| jbpmContext.save(processinstance);
| jbpmContext.close();
| }
| }
|
| return SUCCESS;
| }
| }
Now I want create automatically my swimlane for processes, but how create a swimlane from the process definition.
thank you for your help
antitrust1982
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976509#3976509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976509
19 years, 7 months
[Beginners Corner] - Re: Newbie Need Help :)
by jaikiran
Strange since the file that comes by default contains the following(apart from all other things):
<!-- ==================================================================== -->
| <!-- Class Loading -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.web.WebService"
| name="jboss:service=WebService">
| <attribute name="Port">8083</attribute>
| <!-- Should non-EJB .class files be downloadable -->
| <attribute name="DownloadServerClasses">true</attribute>
| <!-- Should resources other than .class files be downloadable. Both
| DownloadServerClasses and DownloadResources must be true for resources
| to be downloadable. This is false by default because its generally a
| bad idea as server configuration files that container security
| information can be accessed.
| -->
| <attribute name="DownloadResources">false</attribute>
| <attribute name="Host">${jboss.bind.address}</attribute>
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <!-- Use the default thread pool for dynamic class loading -->
| <depends optional-attribute-name="ThreadPool"
| proxy-type="attribute">jboss.system:service=ThreadPool</depends>
| </mbean>
|
| <!-- ==================================================================== -->
| <!-- JNDI -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.naming.NamingService"
| name="jboss:service=Naming"
| xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
| <!-- The call by value mode. true if all lookups are unmarshalled using
| the caller's TCL, false if in VM lookups return the value by reference.
| -->
| <attribute name="CallByValue">false</attribute>
| <!-- The listening port for the bootstrap JNP service. Set this to -1
| to run the NamingService without the JNP invoker listening port.
| -->
| <attribute name="Port">1099</attribute>
| <!-- The bootstrap JNP server bind address. This also sets the default
| RMI service bind address. Empty == all addresses
| -->
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <!-- The port of the RMI naming service, 0 == anonymous -->
| <attribute name="RmiPort">1098</attribute>
| <!-- The RMI service bind address. Empty == all addresses
| -->
| <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
| <!-- The thread pool service used to control the bootstrap lookups -->
| <depends optional-attribute-name="LookupPool"
| proxy-type="attribute">jboss.system:service=ThreadPool</depends>
| </mbean>
Did you ever change this file? If not, i would suggest you get this file from a fresh installation of the JBoss.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976508#3976508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976508
19 years, 7 months