9.4.6. Performing a task


To begin work on a task, we use either @StartTask or @BeginTask on the listener method:
@StartTask public String start() { ... }
Copy to Clipboard Toggle word wrap
Alternatively, we can begin work on a task with pages.xml:
<page>
  <start-task />
</page>
Copy to Clipboard Toggle word wrap
These annotations begin a special kind of conversation that is significant in terms of the overarching business process. Work done by this conversation has access to state held in the business process context.
If we end the conversation with @EndTask, Seam signals the completion of the task:
@EndTask(transition="completed") 
public String completed() { ... }
Copy to Clipboard Toggle word wrap
Alternatively, we can use pages.xml:
<page>
  <end-task transition="completed" />
</page>
Copy to Clipboard Toggle word wrap
You can also use EL to specify the transition in pages.xml.
At this point, jBPM will continue to execute the business process definition. (In more complex processes, several tasks may need to be completed before process execution can resume.)
Please refer to the jBPM documentation for a more thorough overview of the sophisticated features that jBPM provides for managing complex business processes.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat