| previous section: Understanding Almo 2.0: The settings of Almo elements |
next section: Using the Almo application: Building a Workflow with the Almo application |
Understanding Almo 2.0: Adding, removing, getting and deleting elements
This section will give you an overview of how to add, remove, get and delete elements.
Getting elements
It is very simple to get elements: just use the getElementByLabel method from the Workflow object. Since the label of an element must be unique, you will get the element if it exists or null, if it could not be found.
Deleting elements
Deleting an elements is done by calling the deleteElement method from the Workflow object. This method permanently removes the element from the Workflow.
Adding and removing elements
Note: The method has a light-blue background, if it is only used in the WorkflowConfiguration.
Workflow objects
| Method | Ontology property | Meaning |
|---|---|---|
| addTask(Task t) | has_task | Adds a Task to the Workflow. |
| removeTask(Task t) | -- | Removes a Task from the Workflow. |
| addDefaultOptionalTask(Task t) removeDefaultOptionalTask(Task t) getDefaultOptionalTasks() |
has_default_task | When the WorkflowConfiguration is initialzed only the required Tasks are added. With this setting you can also add optional Tasks to WorkflowConfiguration, when it is initialzed. The ontology datatype property "has_default_task" has the label of the optional Task to add as value. |
Task objects
| Method | Ontology property | Meaning |
|---|---|---|
| addElement(ChildElement e) | has_element | Adds a ChildElement to the Task. |
| removeElement(ChildElement e) | -- | Removes a ChildElement from the Task. |
| add_OnAddIncludeElement(WorkflowElement e) remove_OnAddIncludeElement(WorkflowElement e) get_OnAddIncludeElements() |
on_add_include | Manage the elements that shall be included, when this Task is added. |
| add_OnAddExcludeElement(WorkflowElement e) remove_OnAddExcludeElement(WorkflowElement e) get_OnAddExcludeElements() |
on_add_exclude | Manage the elements that shall be excluded, when this Task is added. |
| add_OnRemoveIncludeElement(WorkflowElement e) remove_OnRemoveIncludeElement(WorkflowElement e) get_OnRemoveIncludeElements() |
on_remove_include | Manage the elements that shall be included, when this Task is removed. |
| add_OnRemoveExcludeElement(WorkflowElement e) remove_OnRemoveExcludeElement(WorkflowElement e) get_OnRemoveExcludeElements() |
on_remove_exclude | Manage the elements that shall be excluded, when this Task is removed. |
Container objects
| Method | Ontology property | Meaning |
|---|---|---|
| addElement(ChildElement e) | has_element | Adds a ChildElement to the Task. |
| removeElement(ChildElement e) | -- | Removes a ChildElement from the Task. |
| add_OnAddIncludeElement(WorkflowElement e) remove_OnAddIncludeElement(WorkflowElement e) get_OnAddIncludeElements() |
on_add_include | Manage the elements that shall be included, when this Container is added. |
| add_OnAddExcludeElement(WorkflowElement e) remove_OnAddExcludeElement(WorkflowElement e) get_OnAddExcludeElements() |
on_add_exclude | Manage the elements that shall be excluded, when this Container is added. |
| add_OnRemoveIncludeElement(WorkflowElement e) remove_OnRemoveIncludeElement(WorkflowElement e) get_OnRemoveIncludeElements() |
on_remove_include | Manage the elements that shall be included, when this Container is removed. |
| add_OnRemoveExcludeElement(WorkflowElement e) remove_OnRemoveExcludeElement(WorkflowElement e) get_OnRemoveExcludeElements() |
on_remove_exclude | Manage the elements that shall be excluded, when this Container is removed. |
Operation objects
| Method | Ontology property | Meaning |
|---|---|---|
| add_OnAddIncludeElement(WorkflowElement e) remove_OnAddIncludeElement(WorkflowElement e) get_OnAddIncludeElements() |
on_add_include | Manage the elements that shall be included, when this Operation is added. |
| add_OnAddExcludeElement(WorkflowElement e) remove_OnAddExcludeElement(WorkflowElement e) get_OnAddExcludeElements() |
on_add_exclude | Manage the elements that shall be excluded, when this Operation is added. |
| add_OnRemoveIncludeElement(WorkflowElement e) remove_OnRemoveIncludeElement(WorkflowElement e) get_OnRemoveIncludeElements() |
on_remove_include | Manage the elements that shall be included, when this Operation is removed. |
| add_OnRemoveExcludeElement(WorkflowElement e) remove_OnRemoveExcludeElement(WorkflowElement e) get_OnRemoveExcludeElements() |
on_remove_exclude | Manage the elements that shall be excluded, when this Operation is removed. |
| previous section: Understanding Almo 2.0: The settings of Almo elements |
next section: Using the Almo application: Building a Workflow with the Almo application |
