To jest stara wersja strony!


Lab 2: Basics of working with Activiti Designer

Web Activiti Modeler has several limitations. Activiti Designer in Eclipse environment provides more functionalities, like in the case of additional properties of elements specification. Therefore, we will open our model in Activiti Designer and prepare a jUnit test for it.

m2e plugin installation

If the m2e plugin is not installed in your eclipse environment, please install it from the address: http://download.eclipse.org/technology/m2e/releases/Maven Integration for Eclipse version 1.4.1.
If slf4j plugin is missing as well, you can install them from another repository, e.g., http://www.fuin.org/p2-repository/.
After installation, remember to restart Eclipse.

Project and model development

Create a new project in eclipse: New → Project…, następnie Activiti → Activiti Project.

Next, add to the project (in src/main/resources/java)
an empty Activiti diagram (New→Other…, Activiti → Activiti Diagram).
Now, design some really simple process model.

Testing the model

Convert the project: Configure → Convert to Maven Project.

Click the right mouse button on the project tree and select: Activiti→Generate unit test.
In src/test/java/org/activiti/designer/test, a JUnit test should be now available.

Run the test and check if it passed or failed.

If the test did not pass properly because e.g. not all libraries could be loaded, please adjust the version of Activiti on your computer.
To do this, we need to change the version of Actviti to 5.XX
(where XX is the correct version) in the 'pom.xml' file.
You can also check the configuration file activiti.cfg.xml describing the Activiti mode. It should be in the directory: src/main/resources/.

Using ActivitiRule, we have access to relevant services that provide interfaces for various functionalities:

  • RepositoryService – provides functionality for deployment, query execution, or process removal,
  • RuntimeService – provides the interface for starting and executing queries to process instances (including their variables);
  • IdentityService – provides the authentication interface.
  • TaskService – provides the interface for managing tasks.
  • FormService – provides the interface for managing forms.
RepositoryService repositoryService = activitiRule.getRepositoryService();
RuntimeService runtimeService       = activitiRule.getRuntimeService();
IdentityService identityService     = activitiRule.getIdentityService();
TaskService taskService             = activitiRule.getTaskService();
FormService formService             = activitiRule.getFormService();
pl/dydaktyka/dss/lab2.1508161639.txt.gz · ostatnio zmienione: 2019/06/27 15:57 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0