[jboss-user] [JBoss jBPM] - Re: Using end-complete-process attribute of end-state
nizzy
do-not-reply at jboss.com
Fri Jun 6 09:46:52 EDT 2008
Forgot ActionHandler
package com.ecebs.sample.action;
|
| import org.apache.log4j.Logger;
| import org.jbpm.context.exe.ContextInstance;
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.exe.ExecutionContext;
|
| /**
| * TODO description
| *
| * @author Alan Nisbet
| * @version $Revision: 1.1 $
| */
|
| /*
| History
| =======
| $Log: DefaultActionHandler.java,v $
| Revision 1.1 2008/06/06 13:35:10 alann
| Periodic Checkin
|
| Revision 1.1 2008/06/05 10:15:08 alann
| Intial Checkin
|
| */
| public class DefaultActionHandler implements ActionHandler {
|
| private static final long serialVersionUID = 1L;
| private static final Logger log = Logger
| .getLogger(DefaultActionHandler.class);
|
| public void execute(ExecutionContext ctx) throws Exception {
|
| ContextInstance ctxInstance = ctx.getContextInstance();
| String status = (String)ctxInstance.getVariable("status");
| leaveNode(ctx, status);
| }
|
| private void leaveNode(ExecutionContext ctx, String transitionName) {
| if (transitionName != null) {
|
| if (log.isDebugEnabled()) {
| log.debug("Calling leaveNode(\"" + transitionName + "\")");
| }
|
| ctx.leaveNode(transitionName);
| } else {
|
| if (log.isDebugEnabled()) {
| log.debug("Calling leaveNode()");
| }
|
| ctx.leaveNode();
| }
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156309#4156309
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156309
More information about the jboss-user
mailing list