`
chc9chc
  • 浏览: 5110 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

Appfuse2.0.2(SSH)整合JBPM3.2.x事务处理

    博客分类:
  • JBPM
阅读更多
JBPM发展到现在,已经被越来越多的人应用,非常感谢Jboss的出色贡献。这篇文章主要讲Appfuse2.0.2(Spring2.5+Struts2.0+Hibernate3)如何与jbpm3.2.x共享事务。
1.下载jbpm3.2.6,新建一个干净的appfuse2.0.2(ssh)的工程,还有建表什么的这里就不多说了。
2.在工程中加入jbpm-identity.jar、jbpm-jpdl.jar和spring-modules-jbpm31.jar类包,也可以通过配置pox.xml的方式。
3.在数据库中新建一张表,例如news,使用appfuse的生成工具,生成dao\service\action等
4.在resources中增加jbpm.cfg.xml、jbpm.mail.templates.xml(不是必须)
5.增加jbpm的配置到hibernate文件中
<session-factory>
      <!-- ############################################ -->
    <!-- # mapping files with external dependencies # -->
    <!-- ############################################ -->

    <!-- Additional mappings defined per module go here -->
    <mapping resource="hibernate.extra.hbm.xml" />
    <mapping resource="hibernate.identity.hbm.xml" />
    <!-- ###################### -->
    <!-- # jbpm mapping files # -->
    <!-- ###################### -->

    <!-- hql queries -->
    <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />

    <!-- hql queries used in simulation for querying historical data.
         uncomment if you want to use the GetSimulationInputCommand
         or you want to use the queries directly.
         beware: the queries need the stddev function to be enabled in your dialect.
         for more information, visit: 
         http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.html -->
    <!--
    <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
    -->

    <!-- graph.action mapping files -->
    <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>

    <!-- graph.def mapping files -->
    <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
    <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>

    <!-- ########################################### -->
    <!-- # mapping file with external dependencies # -->
    <!-- ########################################### -->
    <!-- the following mapping file has a dependency on 'bsh-{version}.jar'.
         uncomment this if bsh is not in your classpath.
         the script element will not be available in process definition files.
         note: this mapping must appear below org/jbpm/graph/def/Action.hbm.xml -->
    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>

    <!-- graph.node mapping files -->
    <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>

    <!-- context.def mapping files -->
    <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>

    <!-- bytes mapping files -->
    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>

    <!-- module.def mapping files -->
    <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>

    <!-- file.def mapping files -->
    <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>

    <!-- taskmgmt.def mapping files -->
    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>

    <!-- scheduler.def mapping files -->
    <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
    <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>

    <!-- graph.exe mapping files -->
    <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>

    <!-- module.exe mapping files -->
    <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>

    <!-- context.exe mapping files -->
    <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>

    <!-- job mapping files -->
    <mapping resource="org/jbpm/job/Job.hbm.xml"/>
    <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
    <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
    <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
    <mapping resource="org/jbpm/job/CleanUpProcessJob.hbm.xml"/>

    <!-- taskmgmt.exe mapping files -->
    <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml" />
    <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>

    <!-- logging mapping files -->
    <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
    <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
    <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>

    <!-- ################## -->
    <!-- # cache settings # -->
    <!-- ##################-->

    <!-- strategy="nonstrict-read-write" can be used with HashtableCacheProvider -->

    <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />

    <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />

    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" /></session-factory>

6.配置applicationContext-dao.xml,增加jbpm与Spring的配置文件
<bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
        <property name="sessionFactory" ref="sessionFactory"/>
        <property name="configuration" value="classpath:jbpm.cfg.xml"/>
    </bean>

    <bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate">
        <constructor-arg index="0" ref="jbpmConfiguration"/>
    </bean>

7.打开applicationContext-service.xml,更改news的Spring配置,改为
<bean id="newsManager" class="com.infohold.app.service.impl.NewsManagerImpl">
		<constructor-arg ref="newsDao"/>
<!--增加spring与jbpm的衔接Configuration-->
        <property name="config" ref="jbpmConfiguration"/>
    </bean>


8.我的NewsAction.java内容
package com.infohold.app.webapp.action;

import com.opensymphony.xwork2.Preparable;
import com.infohold.app.service.NewsManager;
import com.infohold.app.model.AppUser;
import com.infohold.app.model.News;
import com.infohold.app.webapp.action.BaseAction;

import java.util.List;
import java.util.Map;

import org.springframework.security.Authentication;
import org.springframework.security.context.SecurityContext;

public class NewsAction extends BaseAction implements Preparable {
    private NewsManager newsManager;
    private List newss;
    private List tasks;
    private List hisTasks;
    private News news;
    private Long  id;

	public void setNewsManager(NewsManager newsManager) {
        this.newsManager = newsManager;
    }

    public List getNewss() {
        return newss;
    }

    public List getTasks() {
        return tasks;
    }

    public void setTasks(List tasks) {
        this.tasks = tasks;
    }

    public List getHisTasks() {
        return hisTasks;
    }
    
    public void setHisTasks(List hisTasks) {
        this.hisTasks = hisTasks;
    }
    
    public void setId(Long  id) {
        this. id =  id;
    }

    public News getNews() {
        return news;
    }

    public void setNews(News news) {
        this.news = news;
    }
    /**
     * Grab the entity from the database before populating with request parameters
     */
    public void prepare() {
        if (getRequest().getMethod().equalsIgnoreCase("post")) {
            // prevent failures on new
            String newsId = getRequest().getParameter("news.id");
            if (newsId != null && !newsId.equals("")) {
                news = newsManager.get(new Long(newsId));
            }
        }
    }

    public String list() {
        newss = newsManager.getAll();
        return SUCCESS;
    }
    
    public String flowTaskList(){
    	AppUser u=userManager.getUserByUsername(this.getRequest().getRemoteUser());
    	hisTasks = newsManager.hisTaskList(u.getId().toString());
    	tasks = newsManager.taskList(u.getId().toString()); 
//    	newss = newsManager.taskList(u.getId().toString());
    	return SUCCESS;
    }

   

    public String delete() {
        newsManager.remove(news.getId());
        saveMessage(getText("news.deleted"));

        return SUCCESS;
    }

    public String edit() {
        if (id != null) {
            news = newsManager.get(id);
        } else {
            news = new News();
        }

        return SUCCESS;
    }
    
    public String editAndFlow() {
        if (id != null) {
            news = newsManager.getNews(id);
        } else {
            news = new News();
        }
        return SUCCESS;
    }
    
    public String save() throws Exception {
        if (cancel != null) {
            return "cancel";
        }
        if (delete != null) {
            return delete();
        }
        boolean isNew = (news.getId() == null);
        newsManager.saveFlow(news);
        String key = (isNew) ? "news.added" : "news.updated";
        saveMessage(getText(key));
        if (!isNew) {
            return INPUT;
        } else {
            return SUCCESS;
        }
    }
   
}

NewsManagerImpl.java
package com.infohold.app.service.impl;

import java.util.Iterator;
import java.util.List;
import java.util.Vector;

import com.infohold.app.dao.NewsDao;
import com.infohold.app.model.FlowTask;
import com.infohold.app.model.News;
import com.infohold.app.service.NewsManager;
import com.infohold.app.service.impl.GenericManagerImpl;

import javax.jws.WebService;

import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.taskmgmt.exe.TaskInstance;

//不知如何实现,待研究  @WebService(serviceName = "NewsService", endpointInterface = "com.infohold.app.service.NewsManager")
public class NewsManagerImpl extends GenericManagerImpl<News, Long> implements NewsManager {
    NewsDao newsDao;
    private JbpmConfiguration config;
    private JbpmContext ctx;

    public NewsManagerImpl(NewsDao newsDao) {
        super(newsDao);
        this.newsDao = newsDao;
    }
	public JbpmConfiguration getConfig() {
		return config;
	}
	public void setConfig(JbpmConfiguration config) {
		this.config = config;
	}
    public News getNews(Long taskId) {
    	ctx = config.createJbpmContext();
    	TaskInstance ti=ctx.getTaskInstance(taskId);
    	String newsId = (String) ti.getVariable("firstId");    	
        News news = newsDao.get(Long.parseLong(newsId));
        return news;  //To change body of implemented methods use File | Settings | File Templates.
    }
    public News saveFlow(News object) {
    	ctx = config.createJbpmContext();
		News news = newsDao.save(object);
		ProcessDefinition pd=ctx.getGraphSession().findLatestProcessDefinition("first");
		ProcessInstance pi=pd.createProcessInstance();
		TaskInstance ti=pi.getTaskMgmtInstance().createStartTaskInstance();
		//tzh:创建任务实例后会马上执行流程中的<tast>中的代码.如<task>中的<assignment>.
		//也就是说创建任务实例后会把<start-state name="start">中的<task name="填写报销单">任务给执行了.
		ti.setActorId("-2");
		ti.setDescription(news.getFileName());
		ti.setVariable("firstId", news.getId().toString());
		ti.end();
		//Token token = pi.getRootToken();
		//ctx.close();

        return news;
    }

    @SuppressWarnings("unchecked")
	public List<FlowTask> taskList(String userId) {
		ctx = config.createJbpmContext();
		List temp=ctx.getTaskList(userId);
		//tzh:本方法只从JBPM_TASKINSTANCE表中查找"actorid_"为"userid"的任务实例.
		List gxlist=ctx.getTaskMgmtSession().findPooledTaskInstances(userId);
		//tzh:本方法只从JBPM_TASKINSTANCE表中查找"isopen_"等于用户类型的值,且"actorid_"为"null"的任务实例.

		temp.addAll(gxlist);
		Vector userlist=new Vector();
		for (Iterator iter = temp.iterator(); iter.hasNext();) {
			TaskInstance el = (TaskInstance) iter.next();
			FlowTask form=new FlowTask();
			form.setActorId(el.getActorId());
			form.setDescription(el.getDescription());
			form.setTaskid(String.valueOf(el.getId()));
			form.setTaskname(el.getName());
			form.setDate(el.getCreate().toString());
			form.setTokenid(String.valueOf(el.getToken().getId()));
			userlist.add(form);
		}
		return userlist;
	}
    
    @SuppressWarnings("unchecked")
	public List<FlowTask> hisTaskList(String userId) {
		ctx = config.createJbpmContext();
		List temp=newsDao.findAllHisTaskInstanceByUserId(userId);

		Vector userlist=new Vector();
		for (Iterator iter = temp.iterator(); iter.hasNext();) {
			TaskInstance el = (TaskInstance) iter.next();
			FlowTask form=new FlowTask();
			form.setActorId(el.getActorId());
			form.setDescription(el.getDescription());
			form.setTaskid(String.valueOf(el.getId()));
			form.setTaskname(el.getName());
			form.setDate(el.getCreate().toString());
			form.setTokenid(String.valueOf(el.getToken().getId()));
			userlist.add(form);
		}
		return userlist;
	}
}

NewsDaoHibernate.java
package com.infohold.app.dao.hibernate;

import java.util.List;

import org.jbpm.taskmgmt.exe.TaskInstance;

import com.infohold.app.model.FlowTask;
import com.infohold.app.model.News;
import com.infohold.app.dao.NewsDao;
import com.infohold.app.dao.hibernate.GenericDaoHibernate;

import java.util.List;
import java.util.ArrayList;

import org.hibernate.Query;

public class NewsDaoHibernate extends GenericDaoHibernate<News, Long> implements NewsDao {

    public NewsDaoHibernate() {
        super(News.class);
    }

    //un FlowTask
	@SuppressWarnings("unchecked")
	public List findAllHisTaskInstanceByUserId(String userid) {
		//TaskInstance必须用全路径才能找到类
		String hql="from org.jbpm.taskmgmt.exe.TaskInstance ti where ti.isOpen=false and ti.actorId ="+userid;
		List<TaskInstance> list=this.getHibernateTemplate().find(hql);
		return list;
	}
}

taskList.jsp
<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="newsList.title"/></title>
    <meta name="heading" content="<fmt:message key='newsList.heading'/>"/>
    <meta name="menu" content="NewsMenu"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px" class="button"
        onclick="location.href='<c:url value="/editNews.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" class="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<display:table name="tasks" class="table" requestURI="" id="taskList" export="true" pagesize="25">
    <display:column property="taskid" sortable="true" href="editNewsAndFlow.html" media="html"
        paramId="id" paramProperty="taskid" titleKey="task.taskid"/>
    <display:column property="taskid" media="csv excel xml pdf" titleKey="task.taskid"/>
    <display:column property="taskname" sortable="true" titleKey="task.taskname"/>
    <display:column property="description" sortable="true" titleKey="task.description"/>
    <display:column property="actorId" sortable="true" titleKey="task.actorId"/>
    <display:column property="date" sortable="true" titleKey="task.date"/>
    <display:column property="tokenid" sortable="true" titleKey="task.tokenid"/>
</display:table>

<display:table name="hisTasks" class="table" requestURI="" id="hisTaskList" export="true" pagesize="25">
    <display:column property="taskid" sortable="true" href="editNews.html" media="html"
        paramId="taskid" paramProperty="taskid" titleKey="task.taskid"/>
    <display:column property="taskid" media="csv excel xml pdf" titleKey="task.taskid"/>
    <display:column property="taskname" sortable="true" titleKey="task.taskname"/>
    <display:column property="description" sortable="true" titleKey="task.description"/>
    <display:column property="actorId" sortable="true" titleKey="task.actorId"/>
    <display:column property="date" sortable="true" titleKey="task.date"/>
    <display:column property="tokenid" sortable="true" titleKey="task.tokenid"/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("taskList");
</script>

至此,实现简单集成。
1
0
分享到:
评论
4 楼 chc9chc 2009-08-31  
stxu1987 写道
有整合到事物吗..?

是的
3 楼 stxu1987 2009-08-24  
有整合到事物吗..?
2 楼 chc9chc 2009-06-07  
暂时也没更新的必要,里面应用的技术都足够新了。
1 楼 seekgirl 2009-06-07  
appfuse作者好长时间不更新,不知道搞啥

相关推荐

    appfuse2.0.2 Struts2 hibernate Spring 构建的基于SQLServer2005 的ssh2项目的过程全记录

    appfuse2.0.2 Struts2 hibernate Spring 构建的基于SQLServer2005 的ssh2项目的过程全记录 网上很多帖子介绍appfuse2构建过程的,但是基于SQLServer2005的没有,顶多一笔带过,另外对于期间出现的各种问题也没有个说明,...

    appfuse 2.0.2PDF格式文档

    标题:AppFuse 2.0.2 - 快速启动Web应用开发的开源框架 描述:AppFuse 2.0.2文档,PDF格式,详细介绍了AppFuse的应用、特性和如何利用它加速Web应用的开发过程。 AppFuse是一款用于“快速启动”Web应用开发的开源...

    appfuse 2.0.2文档 pdf

    标题提及的是"appfuse 2.0.2文档",这表明我们要探讨的是AppFuse项目的一个特定版本,即2.0.2的文档内容。AppFuse是一个开源项目,它提供了一个快速开发Java Web应用程序的基础框架。这个版本的文档很可能是关于如何...

    Appfuse1.9至2.0.2

    主要是自己从网络上搜集的一些关于appfuse1.8.2-2.0.2的一些相关资料,间或有点自己试验的记录,还有点maven和quartz的东东,之前我主要是用1.8.2构建项目,感觉还不错,希望对想学习appfuse的人有些帮助.

    建立项目原型骨架的步骤(最新版本appfuse)appfuse2.1.0-M2

    `mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0-M2 -DgroupId=cn.xue.app -DartifactId=xueAppFuse` ...

    AppFuse1.x快速构建J2ee应用

    **AppFuse 1.x 快速构建 J2EE 应用** AppFuse 是一个开源项目,旨在简化 J2EE 应用程序的开发过程。它提供了一种模板化的方法来创建新的 Web 应用,结合了多种流行的技术和最佳实践。在 AppFuse 1.x 版本中,开发者...

    appfuse.tar.gz

    Maven repository (/Users/${username}/.m2/repository on OS X and C:\Documents and Settings\${username}\.m2\repository on Windows). To setup hierarchical projects in Eclipse 3.2+, perform the ...

    使用AppFuse快速构建J2EE应用.doc

    4. **事务控制**:Spring框架提供了强大的事务管理,可以轻松控制数据库操作的事务边界。 5. **日志**:通过集成Log4j或其他日志框架,方便记录和调试应用日志。 6. **缓存**:通过引入缓存机制,如 Ehcache,提高...

    SSH学习及开发框架-appfuse

    appfuse 有struts2+hibernate+spring的整合 springmvc+hibernate+spring的整合 多模块,但模块都有 学习开发参考使用非常方便 可以到官方下载最新版的,我只是把自己下载的打包整理一下 注意哈,都是基于maven的...

    Appfuse教程Appfuse开发.pdf

    package org.appfuse.model; /** @hibernate.class table="PERSON" */ public class Person extends BaseObject { private Long id; private String firstName; private String lastName; // Getter and ...

    AppFuse(3)

    它提供了一个基础框架,整合了多种流行的开源技术,帮助开发者快速构建应用。AppFuse 3 版本是该项目的一个特定迭代,可能包含了对先前版本的一些改进和更新。 在提供的文件列表中,我们可以看到一些关键的库和组件...

    appfuse-tutorial-struts-1.6.zip_appfuse

    AppFuse 是一个开源项目,旨在简化Java Web应用程序的开发。这个"appfuse-tutorial-struts-1.6.zip"文件是一个基于Struts 1.6的AppFuse教程,用于指导开发者如何构建一个企业级的人员管理系统。Struts是Apache软件...

    appfuse-service-3.0.0.zip

    《AppFuse Service 3.0.0:内存POJO MVCC缓存的开源实现》 在IT领域,尤其是在分布式系统和大数据处理中,高效的并发控制是至关重要的。AppFuse Service 3.0.0,一个开源项目,为开发者提供了一个简单易用的内存...

    APPFUSE工具研究.doc

    AppFuse分为1.x和2.0两个主要版本,其中2.0版是重构建的,采用了Maven 2作为构建工具,而1.x版本则使用Ant。 Maven 2的引入带来了许多优势,包括自动下载依赖项、简化维护(因为所有组件可以一次编译)以及方便最终...

    appfuse快速上手

    appfuse快速上手AppFuse+QuickStart.html

    jbpm 项目实践 1.2 (集成appfuse spring modules)

    【jbpm 项目实践 1.2 集成appfuse spring modules】 jbpm(Java Business Process Management)是一个开源的工作流管理系统,它提供了一整套工具和服务,用于管理业务流程。在jbpm 1.2的实践中,我们将讨论如何集成...

    Using Struts 2 - AppFuse 2 - Confluence(1).pdf

    ### 使用Struts 2与AppFuse 2:深入解析与实战指南 #### 一、Struts 2简介 Struts 2(前身为WebWork)是一款以简洁为设计理念的Web框架,它基于XWork构建,XWork是一个通用的命令模式框架。尽管XWork拥有自己的...

Global site tag (gtag.js) - Google Analytics