 |
grispa-dienstplaner |
Software for creating duty rosters
API
An API documentation (javadoc) you can find here here.
Creating and loading custom assignement rules
To create assignement rules the Java interface de.gpsoft.shifter.api.staffroster.assignementrules.AssignementRule
has to be implemented.
In folder grispa-dienstplaner/api-examples/assignementrule/src/de/gpsoft/shifter/assignementrules/custom
you can find the class RestPeriodAfterShift.java as an example.
Activate assignement rule classes as follows:
- Open the file grispa-dienstplaner.bat (on Windows™) or grispa-dienstplaner (on Linux/Unix) and
enahance the variable ASSIGNEMENTRULE_CLASSPATH by the path to the folder
including the Java class or package, or the path and file name of a JAR file including the class or package.
Here is an example for our class on Windows™:
set ASSIGNEMENTRULE_CLASSPATH=c:/Program files/grispa-dienstplaner/api-examples/assignementrule/classes
on Linux:
export ASSIGNEMENTRULE_CLASSPATH=/opt/grispa-dienstplaner/api-examples/assignementrule/classes
- Start grispa-dienstplaner and open the basic settings dialog by clicking on Settings->Basic settings in the menu.
Add the name of the Java class to the text field Name of Java classes, for our example:
de.gpsoft.shifter.assignementrules.custom.RestPeriodAfterShift
- If you open a duty roster, you see a new check box inside the panel containing the assignement rules
labeld with the presentation name of the new assignement rule. If it is configurable, you see also a
button to start the configuration.
After successfully adding the example class you see a dialog where you can select a shift and
a number of days which an employee can take as rest period after he worked in that shift. To test it
open the prepared enterprise configuration file grispa-dienstplaner/api-examples/assignementrule/assignementrule.dpl
and assign employees.