[JBoss jBPM] - Never ending processes
by jpuro
I am tasked with creating a business process that starts up, checks if a file is ready for parsing, and then if it is, parses the file. If no file is available for parsing, it should keep checking for the file. So essentially there are 5 nodes here:
1) Start Node
2) Check for File Node
3) Decision Node (transition to parse node if file exists, transition to check for file node if file does not exist)
4) Parse File Node
5) End Node
The question that I have is, in a process like this, which keeps looping back to "Check for File" if there is no file available, should it ever end? My question is a general one, should a business process ever be non ending? That is, should "Parse File Node" return to "Check for File Node" even after it is finished doing its work. Should the end node never be called in a business process like this?
Or should a business process always startup and eventually end. So instead of the "Decision Node" transitioning back to "Check for File Node" when a file is not found, should it transition to the "End Node" and thus require an outside system to re-instantiate a new process instance every X frequency.
Regards,
Jeff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990848#3990848
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990848
18 years, 1 month
[JBoss Seam] - Plurals
by jarkko@jab.fi
Hello hello,
Seam has nice way of handling i18n by the usage of #{messages.key}, with nice support for param passing to messages (eg. #{stuff.name} in the value ).
Now i'm trying to implement something that would allow us to construct grammatically correct messages regarding plurals. I just started to study this so the first question is: does Seam already has something that could be used to archieve this?
Fast googling revealed not too many resources about the issue.
1. http://java.sun.com/docs/books/tutorial/i18n/format/choiceFormat.html
I came up with couple bad ideas how to tackle this.
1. Use Server side JavaScript/something with logic constructs inside the properties files. Like
found_num_targets=switch #{foundTargets.rowCount}: {
| case 0: return "No targets found"; // nothing
| case 1: return "Found 1 target"; // one
| default: return "Found #{foundTargets.rowCount} targets"; // multiple
| }
|
pros: Allows you to do almost anything
cons: well... it's just stupid ( and likely hard to get it right)
2. Use "smart" concatenation with the key plus some added logic somewhere.
| <b>#{messages.found_num_targets_#{foundTargets.rowCount}}</b>
|
and then in properties file we have:
| found_num_targets_0=No targets found
| found_num_targets_1=Found 1 target
| found_num_targets_2=Found #{foundTargets.rowCount} targets
|
etc,-10,-1,0 maps to 0; 1 maps to 1; 2,3,4,etc maps to 2
pros: seems clean enough
cons: requires multiple keys in property file, maybe hard on the parsing (with #{} in the key part}. Could #{messages.['found_num_targets_#{foundTargets.rowCount}']} work? If so, it's starting to look pretty ugly..
Anyone dealt the "plural" issue any other ways?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990842#3990842
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990842
18 years, 1 month