[jboss-cvs] jboss-seam/src/main/org/jboss/seam/annotations/bpm ...
Gavin King
gavin.king at jboss.com
Mon Jun 25 18:28:50 EDT 2007
User: gavin
Date: 07/06/25 18:28:50
Added: src/main/org/jboss/seam/annotations/bpm BeginTask.java
CreateProcess.java EndTask.java ResumeProcess.java
StartTask.java Transition.java
Log:
move annotations to subpackages
Revision Changes Path
1.1 date: 2007/06/25 22:28:50; author: gavin; state: Exp;jboss-seam/src/main/org/jboss/seam/annotations/bpm/BeginTask.java
Index: BeginTask.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.annotations.bpm;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import org.jboss.seam.annotations.FlushModeType;
/**
* Marks a method as causing a jBPM {@link org.jbpm.taskmgmt.exe.TaskInstance task}
* to be resumed. The jBPM {@link org.jbpm.context.exe.ContextInstance}
* is associated with the BUSINESS_PROCESS scope and the
* {@link org.jbpm.taskmgmt.exe.TaskInstance} is associated with a new
* conversation, unless the annotated method returns a null outcome.
* <p/>
* Note that both {@link BeginTask} and {@link StartTask} have effect
* before invocation of the intercepted method in that they are both
* about setting up appropriate {@link org.jbpm.context.exe.ContextInstance}
* for the current {@link org.jboss.seam.contexts.BusinessProcessContext}.
* <p/>
*
* @author Steve Ebersole
*/
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface BeginTask
{
/**
* The name of the request parameter under which we should locate the
* the id of task to be resumed.
*/
String taskIdParameter() default "";
/**
* An EL expression that evaluates to the task id.
* @return an EL expression
*/
String taskId() default "#{param.taskId}";
/**
* The name of the jBPM process definition defining the page flow for
* this conversation.
*/
String pageflow() default "";
/**
* An EL expression for the conversation id. If a conversation with
* the same id aready exists, Seam will redirect to that conversation.
*
* @deprecated use <conversation/> in pages.xml
*/
String id() default "";
/**
* Set the FlushMode for any EntityManager used in
* this conversation.
*/
FlushModeType flushMode() default FlushModeType.AUTO;
}
1.1 date: 2007/06/25 22:28:50; author: gavin; state: Exp;jboss-seam/src/main/org/jboss/seam/annotations/bpm/CreateProcess.java
Index: CreateProcess.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.annotations.bpm;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Marks a method creating a jBPM
* {@link org.jbpm.graph.exe.ProcessInstance process instance}
* unless the method throws an exception or returns a null outcome.
*
* @author Steve Ebersole
*/
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface CreateProcess
{
/**
* The name of the {@link org.jbpm.graph.def.ProcessDefinition} from which
* to create the {@link org.jbpm.graph.exe.ProcessInstance}
*/
String definition();
/**
* An EL expression that evaluates to the process
* business key.
*
* @return an EL expression or an empty string to indicate a null key
*/
String processKey() default "";
}
1.1 date: 2007/06/25 22:28:50; author: gavin; state: Exp;jboss-seam/src/main/org/jboss/seam/annotations/bpm/EndTask.java
Index: EndTask.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.annotations.bpm;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Marks a method as causing a jBPM
* {@link org.jbpm.taskmgmt.exe.TaskInstance task instance}
* to be ended. The current conversation also ends. If a list of outcomes
* is specified, the task ends only if the outcome is in the list. A null
* outcome never ends the task.
*
* @see org.jbpm.taskmgmt.exe.TaskInstance#end(String)
* @author Gavin King
*/
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface EndTask
{
/**
* An empty outcome list is interpreted to mean any
* outcome except for the null (redisplay) outcome.
*
* @deprecated use BusinessProcess.instance().end("...") and
* Conversation.instance().end()
*/
String[] ifOutcome() default {};
/**
* Specifies the transition that should be triggered by
* completing the task. If the transition needs to be
* specified dynamically, use the Seam <tt>transition</tt>
* component, calling <tt>Transition.setName()<tt>.
*
* @return a transition name
*/
String transition() default "";
/**
* Should the conversation be destroyed before any
* redirect? (The default behavior is to propagate
* the conversation across the redirect and then
* destroy it at the end of the redirected request.)
*
* @return false by default
*/
boolean beforeRedirect() default false;
}
1.1 date: 2007/06/25 22:28:50; author: gavin; state: Exp;jboss-seam/src/main/org/jboss/seam/annotations/bpm/ResumeProcess.java
Index: ResumeProcess.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.annotations.bpm;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Marks a method as causing an existing jBPM
* {@link org.jbpm.graph.exe.ProcessInstance process instance}
* to be associated with the current conversation, unless the
* annotated method returns a null outcome.
*
* @author Steve Ebersole
*/
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface ResumeProcess
{
/**
* The name of the request parameter under which we should locate the
* the id of process to be resumed.
* (not required for lookup by business key)
*
* @return a request parameter name
*/
String processIdParameter() default "";
/**
* An EL expression that evaluates to the process id.
* (not required for lookup by business key)
*
* @return an EL expression
*/
String processId() default "#{param.processId}";
/**
* An EL expression that evaluates to the process
* business key.
* (optional, only required for lookup by business key)
*
* @return an EL expression
*/
String processKey() default "";
/**
* The name of the {@link org.jbpm.graph.def.ProcessDefinition}
* (optional, only required for lookup by business key)
*/
String definition() default "";
}
1.1 date: 2007/06/25 22:28:50; author: gavin; state: Exp;jboss-seam/src/main/org/jboss/seam/annotations/bpm/StartTask.java
Index: StartTask.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.annotations.bpm;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import org.jboss.seam.annotations.FlushModeType;
/**
* Marks a method as causing jBPM {@link org.jbpm.taskmgmt.exe.TaskInstance task}
* to be started. The jBPM {@link org.jbpm.context.exe.ContextInstance}
* is associated with the BUSINESS_PROCESS scope and the
* {@link org.jbpm.taskmgmt.exe.TaskInstance} is associated with a new
* conversation, unless the annotated method returns a null outcome.
* <p/>
* Note that both {@link BeginTask} and {@link StartTask} have effect
* before invocation of the intercepted method in that they are both
* about setting up appropriate {@link org.jbpm.context.exe.ContextInstance}
* for the current {@link org.jboss.seam.contexts.BusinessProcessContext};
* {@link StartTask} however, also has effect after method invocation
* as that is the time it actually marks the task as started.
*
* @see org.jbpm.taskmgmt.exe.TaskInstance#start()
* @author Steve Ebersole
*/
@Target( METHOD )
@Retention( RUNTIME )
@Documented
public @interface StartTask
{
/**
* The name of the request parameter under which we should locate the
* the id of task to be started.
*/
String taskIdParameter() default "";
/**
* An EL expression that evaluates to the task id.
* @return an EL expression
*/
String taskId() default "#{param.taskId}";
/**
* The name of the jBPM process definition defining
* the page flow for this conversation.
*/
String pageflow() default "";
/**
* An EL expression for the conversation id. If a conversation with
* the same id aready exists, Seam will redirect to that conversation.
*
* @deprecated use <conversation/> in pages.xml
*/
String id() default "";
/**
* Set the FlushMode for any EntityManager used in
* this conversation.
*/
FlushModeType flushMode() default FlushModeType.AUTO;
}
1.1 date: 2007/06/25 22:28:50; author: gavin; state: Exp;jboss-seam/src/main/org/jboss/seam/annotations/bpm/Transition.java
Index: Transition.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.annotations.bpm;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Marks a method as causing a jBPM transition after
* the method returns a non-null result without exception.
*
* @author Gavin King
*/
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface Transition
{
/**
* The transition name, defaults to the name
* of the method.
*
* @return the transition name
*/
String value() default "";
}
More information about the jboss-cvs-commits
mailing list