// specify your DSL grammar rules here ... // IMPORTANT: You should change the property 'overwrite.pluginresources=true' in the properties file to 'overwrite.pluginresources=false' AFTER first generation Model: (persons+=Person)* (groups+=Group)* (roles+=Role)* (swimlanges+=SwimLane)* (process=Process) ; Person: "cn" firstName=ID"," lastName=ID ("," email=ID("@"ID"."ID))? ; Group: "group" name=ID "{" (persons+=[Person] ";")* "}" ; Role: "role" name=ID "{" (persons+=[Person] ";")* "}" ; SwimLane: "swimlane" name=ID "{" (pools+=Pool)* "}" ; Pool: "pool" name=ID "{" ("role" role=[Role])? ("group" group=[Group])? (activities+=Activity)* "}" ; Activity: HumanTask | Subprocess | Webservice | Notification | Loop | Gateway | Start | End ; Start: "start" name=ID "to" activity=[Activity] ";" ; End: "end" (isFailedState?="failure") name=ID ";" ; Loop: "loop" conditionExpression=ConditionExpression "{" activity=Activity "}" ; HumanTask: "task" name=ID "{" ("url" (isHTML?="html")? (isSilverlight?="silverlight")? (isFlex?="flex")? url=URI ";")? (form=Form)? "to" activity=[Activity] ";" (actions+=Action)* "}" ; Action: "action" name=ID ";" ; Form: "form" name=ID "{" (controls+=Control)* "}" ; Control: TextBox | ComboBox | TextArea | Label | Flow ; Flow: "flow" (isVertical?="vertical")? (isHorizontal?="horizontal")? "{" (controls+=Control)* "}" ; TextBox: "textbox" id=ID ("width" "=" width=INT)? ("length" "=" length=INT)? ";" ; ComboBox: "combobox" id=ID "{" ("width" "=" width=INT)? (options+=Option)* "}" ; Option: "option" value=ID ("id" "=" id=ID) ";" ; TextArea: "textarea" id=ID ("width" "=" width=INT)? ("height" "=" height=INT)? ("length" "=" length=INT)? ";" ; Label: "label" name=ID ";" ; Subprocess: "subprocess" name=ID "{" (process=[Process]) "to" activty=[Activity] ";" "}" ; Notification: "notification" name=ID "{" ("email" email=ID("@"ID"."ID) ";")? ("sms" phoneNumber=ID ";")? ("rss" feed=STRING ";")? ("telphone" phoneNumber=ID ";")? "to" activity=[Activity] ";" "}" ; Webservice: "service" name=ID "to" activity=[Activity] ";" ; Enum HTTPVerb: Get="GET" | Put="PUT" | Post="POST" | Delete = "DELETE" ; Gateway: XORGateway | ANDGateway ; XORGateway: "gateway" (isXOR?="xor") name=ID "{" ("condition" conditionExpressions+=ConditionExpression "to" activities+=[Activity] ";")* "}" ; ANDGateway: "gateway" (isAND?="and") name=ID "{" ("to" activities+=[Activity] ";")* "}" ; Process: "process" name=ID "{" (variables+=Variable)* (swimlanes+=[SwimLane])* "}" ; Variable: ("variable" name=ID ";"); Enum LogicalOperator: Equal = "==" | NotEqual = "!=" | GreaterThan = ">" | LessThan = "<" | GreaterThanOrEqual = ">=" | LessThanOrEqual="<="; Enum AlgebraicOperator: Multiply = "*" | Add="+" | Subtract="-" | Divide = "/" ; ConditionExpression: IsNot "(" [Variable] LogicalOperator Expression ")" ; IsNot: (isNot?="!")? ; Expression: [Variable] | Number | Double | CompositeExpression ; CompositeExpression: ("("Expression AlgebraicOperator Expression")"); Number: number=INT ; Double: i=INT"."d=INT;