이 콘텐츠는 선택한 언어로 제공되지 않습니다.

29.4. Annotations for context demarcation


These annotations provide declarative conversation demarcation. They appear on Seam component methods, usually action listener methods.
Every web request is associated with a conversation context. Most of these conversations end when the request is complete. To span a conversation across multiple requests, you must "promote" the conversation to a long-running conversation by calling a method marked with @Begin.
@Begin
@Begin
Copy to Clipboard Toggle word wrap
Specifies that a long-running conversation begins when this method returns a non-null outcome without exception.
@Begin(join=true)
Copy to Clipboard Toggle word wrap
Specifies that, if a long-running conversation is already in progress, the conversation context is propagated.
@Begin(nested=true)
Copy to Clipboard Toggle word wrap
Specifies that, if a long-running conversation is already in progress, a new nested conversation context should begin. The nested conversation will end when the next @End is encountered, and the outer conversation will resume. Multiple nested conversations can exist concurrently in the same outere conversation.
@Begin(pageflow="process definition name")
Copy to Clipboard Toggle word wrap
Specifies a jBPM process definition name that defines the pageflow for this conversation.
@Begin(flushMode=FlushModeType.MANUAL)
Copy to Clipboard Toggle word wrap
Specifies the flush mode of any Seam-managed persistence contexts. flushMode=FlushModeType.MANUAL supports the use of atomic conversations, where all write operations are queued in the conversation context until an explicit call to flush() (which usually occurs at the end of the conversation) is made.
  • join — determines the behavior when a long-running conversation is already in progress. If true, the context is propagated. If false, an exception is thrown. Defaults to false. This setting is ignored when nested=true is specified.
  • nested — specifies that a nested conversation should be started if a long-running conversation is already in progress.
  • flushMode — sets the flush mode of any Seam-managed Hibernate sessions or JPA persistence contexts that are created during this conversation.
  • pageflow — the name of a jBPM process definition deployed via org.jboss.seam.bpm.jbpm.pageflowDefinitions.
@End
@End
Copy to Clipboard Toggle word wrap
Specifies that a long-running conversation ends when this method returns a non-null outcome without exception.
  • beforeRedirect — by default, the conversation will not actually be destroyed until after any redirect has occurred. Setting beforeRedirect=true specifies that the conversation should be destroyed at the end of the current request, and that the redirect will be processed in a new temporary conversation context.
  • root — by default, ending a nested conversation simply pops the conversation stack and resumes the outer conversation. Setting root=true specifies that the root conversation should be destroyed, which destroys the entire conversation stack. If the conversation is not nested, the current conversation is destroyed.
@StartTask
@StartTask
Copy to Clipboard Toggle word wrap
Starts a jBPM task. Specifies that a long-running conversation begins when this method returns a non-null outcome without exception. This conversation is associated with the jBPM task specified in the named request parameter. Within the context of this conversation, a business process context is also defined, for the business process instance of the task instance.
  • The jBPM TaskInstance is available in the taskInstance request context variable. The jBPM ProcessInstance is available in the processInstance request context variable. These objects can be injected with @In.
  • taskIdParameter — the name of a request parameter which holds the task ID. Default to "taskId", which is also the default used by the Seam taskList JSF component.
  • flushMode — sets the flush mode of any Seam-managed Hibernate sessions or JPA persistence contexts that are created during this conversation.
@BeginTask
@BeginTask
Copy to Clipboard Toggle word wrap
Resumes work on an incomplete jBPM task. Specifies that a long-running conversation begins when this method returns a non-null outcome without exception. This conversation is associated with the jBPM task specified in the named request parameter. Within the context of this conversation, a business process context is also defined, for the business process instance of the task instance.
  • The jBPM org.jbpm.taskmgmt.exe.TaskInstance is available in the taskInstance request context variable. The jBPM org.jbpm.graph.exe.ProcessInstance is available in the processInstance request context variable.
  • taskIdParameter — the name of a request parameter which holds the ID of the task. Defaults to "taskId", which is also the default used by the Seam taskList JSF component.
  • flushMode — sets the flush mode of any Seam-managed Hibernate sessions or JPA persistence contexts that are created during this conversation.
@EndTask
@EndTask
Copy to Clipboard Toggle word wrap
Ends a jBPM task. Specifies that a long-running conversation ends when this method returns a non-null outcome, and that the current task is complete. Triggers a jBPM transition. The actual transition triggered will be the default transition unless the application has called Transition.setName() on the built-in component named transition.
@EndTask(transition="transitionName")
Copy to Clipboard Toggle word wrap
Triggers the specified jBPM transition.
  • transition — the name of the jBPM transition to be triggered when ending the task. Defaults to the default transition.
  • beforeRedirect — by default, the conversation will not actually be destroyed until after any redirect has occurred. Setting beforeRedirect=true specifies that the conversation should be destroyed at the end of the current request, and that the redirect will be processed in a new temporary conversation context.
@CreateProcess
@CreateProcess(definition="process definition name")
Copy to Clipboard Toggle word wrap
Creates a new jBPM process instance when the method returns a non-null outcome without exception. The ProcessInstance object will be available in a context variable named processInstance.
  • definition — the name of the jBPM process definition deployed via org.jboss.seam.bpm.jbpm.processDefinitions.
@ResumeProcess
@ResumeProcess(processIdParameter="processId")
Copy to Clipboard Toggle word wrap
Re-enters the scope of an existing jBPM process instance when the method returns a non-null outcome without exception. The ProcessInstance object will be available in a context variable named processInstance.
  • processIdParameter — the name of the request parameter that holds the process ID. Defaults to "processId".
@Transition
@Transition("cancel")
Copy to Clipboard Toggle word wrap
Marks a method as signalling a transition in the current jBPM process instance whenever the method returns a non-null result.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat