make <Field f>,<Closure behaviour> on <Transition t> when <Closure<Boolean> condition>
Changes behaviour of given data field f on transition t, iff condition returns true. Behaviour can be one of:
- visible,
- editable,
- required,
- optional,
- hidden.
- forbidden
change <Field> about <Closure>
Deprecated
See change value.
change <Field f> value <Closure calculation>
Sets new value to data field f returned by calculation closure. If the returned value is null, fields value is set to default value. If the returned value is unchanged, fields value is unchanged and actions with a trigger set on given field are not triggered.
change <Field> choices <Closure choices>
Sets a new set of choices to data field f.
generate <String method,Closure repeat> into <Field f>
Calls method and saves generated value into data field f. The field can be only of type Text or File. If repeat is equal to always new value is generated on each run of action. If repeat is equal to once new value is generated only if fields value is null.
changeCaseProperty <String property> about <Closure supplier>
Changes the property of the current case, the new value is generated by the supplier.
Case createCase(String identifier, String title = null, String color = "", User author = userService.loggedOrSystem)
Creates a new instance of the newest version of net identified by the identifier. If the title is not specified, nets default case name is used. If the colour is null, the default colour is used (black at the moment).
Case createCase(PetriNet net, String title = net.defaultCaseName.defaultValue, String color = "", User author = userService.loggedOrSystem)
Creates a new instance of the given net. If the title is not specified, nets default case name is used. If the colour is null, the default colour is used (black at the moment).
List<Case> findCases(Closure<Predicate> predicate)
Finds all the cases that match the given predicate. The predicate is a groovy closure that accepts QCase object and returns QueryDSL Predicate.
List<Case> findCases(Closure<Predicate> predicate, Pageable page)
Finds all the cases that match the given predicate. The predicate is a groovy closure that accepts QCase object and returns QueryDSL Predicate. Pageable determines the requested page number, page size, sort fields, and sort direction.
Case findCase(Closure<Predicate> predicate)
Finds the first case that matches the given predicate. The predicate is a groovy closure that accepts QCase object and returns QueryDSL Predicate.
List<Task> findTasks(Closure<Predicate> predicate)
Finds all tasks that match the given predicate. The predicate is a groovy closure that accepts QCase object and returns QueryDSL Predicate.
List<Task> findTasks(Closure<Predicate> predicate, Pageable page)
Finds all tasks that match the given predicate. The predicate is a groovy closure that accepts QCase object and returns QueryDSL Predicate. Pageable determines the requested page number, page size, sort fields, and sort direction.
Task findTask(Closure<Predicate> predicate)
Finds the first task that matches the given predicate. The predicate is a groovy closure that accepts QCase object and returns QueryDSL Predicate.
close <List<Transition>>
Deprecated
See cancel.
execute <String transitionId> where <Closure<Predicate>> with <Map>
Executes all fireable transitions identified by the transitionId in all case where the predicate returns true. For each task following actions are called:
- assign to the system user
- save new data values
- finish.
The predicate is a list of Querydsl queries. Every case property can be used in a query. For more info see querydsl doc and QCase javadoc.
Task assignTask(String transitionId, Case aCase = useCase, User user = userService.loggedOrSystem)
Assign the task in current case with given transitionId. Optional parameter aCase identifies case which the task belongs to. Optional parameter user identifies actor who will perform assign.
Task assignTask(Task task, User user = userService.loggedOrSystem)
Assign the task to user. Optional parameter user identifies actor who will perform assign.
assignTasks(List<Task> tasks, User assignee = userService.loggedOrSystem)
Assign the tasks to user. Optional parameter user identifies actor who will perform assign.
cancelTask(String transitionId, Case aCase = useCase, User user = userService.loggedOrSystem)
Cancels the task in current case with given transitionId. Optional parameter aCase identifies case which the task belongs to. Optional parameter user identifies actor who will perform cancel.
cancelTask(Task task, User user = userService.loggedOrSystem)
Cancels the provided task. Optional parameter user identifies actor who will perform cancel.
cancelTasks(List<Task> tasks, User user = userService.loggedOrSystem)
Cancels all the provided tasks. Optional parameter user identifies actor who will perform cancel.
finishTask(String transitionId, Case aCase = useCase, User user = userService.loggedOrSystem)
Finish the task in current case with given transitionId. Optional parameter aCase identifies case which the task belongs to. Optional parameter user identifies actor who will perform cancel.
finishTask(Task task, User user = userService.loggedOrSystem)
Finish the provided task. Optional parameter user identifies actor who will perform cancel.
finishTasks(List<Task> tasks, User user = userService.loggedOrSystem)
Finish all the provided tasks. Optional parameter user identifies actor who will perform cancel.
setData(Task task, Map dataSet)
Sets values of data fields on given task. Values are mapped to data fields in dataSet using data fields import Id as key.
setData(Transition transition, Map dataSet)
Sets values of data fields on task of transition in current case. Values are mapped to data fields in dataSet using data fields import Id as key.
setData(String transitionId, Case useCase, Map dataSet)
Sets values of data fields on task identified by transitionId of given case. Values are mapped to data fields in dataSet using data fields import Id as key.
Map<String, Field> getData(Task task)
Gets all data fields on given task, mapped by its import Id.
Map<String, Field> getData(Transition transition)
Gets all data fields on the task of transition in the current case, mapped by its import Id.
Map<String, Field> getData(String transitionId, Case useCase)
Gets all data fields on the task defined by its transitionId in given case, mapped by its import Id.
User assignRole(String roleId, User user = userService.loggedUser)
Assigns role identified by roleId to user. User is optional parameter, default value is currently logged user. Returns updated object of user.
User loggedUser()
Returns currently logged user.