Async taskdefinitions.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2013 01:51 AM
Is there a way to find out if a task is async, the usecase is if a process has async task then i should throw error to the user. I checked TaskDefinition class there is no api to check if a task is async…
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2013 03:16 AM
TaskDefinition is only the UserTask-specific bit. Inspect the actual ActivityImpl which is present in the ReadOnlyProcessDefinition (repositoryService):
Alternatively, you could add a BPMNParseListener (in 5.12, this will be a slight different name and approach, but the end-result will be the same) and inspect the XML-element or the intermediate model, so you can throw an exception when the process is deployed (as of 5.11):
In case you're using a version prior to 5.11, you can always inspect the "async" attribute in the XML-element, passed in the BPMNParseListeners…
public interface PvmActivity extends PvmScope {
boolean isAsync();
Alternatively, you could add a BPMNParseListener (in 5.12, this will be a slight different name and approach, but the end-result will be the same) and inspect the XML-element or the intermediate model, so you can throw an exception when the process is deployed (as of 5.11):
/**
* @author Tijs Rademakers
*/
public class Activity extends FlowNode {
…
public boolean isAsynchronous() {
return asynchronous;
}
In case you're using a version prior to 5.11, you can always inspect the "async" attribute in the XML-element, passed in the BPMNParseListeners…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2013 04:09 AM
Thank you frederikheremans

