Menu

WorkflowXMLConfiguration Log in to Edit

mrizzo99

The WorkFlowManager will utilize a main XML configuration file (workflow.xml) to configure all states and transitions applicable within the application work flow. This configuration file basically models a single, all encompassing, work flow within the application.

Depicted below is the skeleton of the workflow.xml file and its associated tags.

<?xml version="1.0"?>
<workflow-manager>
<state name="<state-name>">
    <transition name="<transition-name>" next-state="<state-name>" >
        <rule type="<class-name>" >
          <rule-condition type="<class-name>" >
                          <property name="<name>" value="<value>" />
                       more    
                      </rule-condition>
                       more   
        </rule>
               more
    </transition>
        more
</state>
  more
</workflow-manager>

The <workflow-manager> tag is simply the root tag for the XML configuration file. The root tag simply indicates the beginning and the end of the configuration of the WorkFlowManager.

The <state> tag indicates a specific state within the work flow. When we refer to state we refer to a particular finite state with a state transition machine. A state represents a temporary position in a work flow with associated properties. The <state> tag correspond to an instance of the State class (org.jharks.workflow.State)
Attributes of the <state> tag:
- name: represents the logical name of the state.

  • view-mapping: the view-mapping associated with this state. The view mapping will be returned to the ViewController in order for the appropriate GUI screen to be displayed on the client.

    Configurable tags allowed within <state> tag:
    <transition> 1 or more.</transition></state>

The <transition> tag models a link between two states. Allows for the transition of one state to another state within the work flow. The <transition> tag corresponds to an instance of the Transition class (org.jharks.workflow.Transition).
Attributes of the <transition> tag:
- name: the logical name of the transition.</transition></transition></transition>

  • next-state: the logical name of the destination state of the transition.

    Configurable tags allowed within <transition> tag:
    <rule> 1 or more
    <rule-set> 0 or 1</rule-set></rule></transition>

The <rule> tag models a conditional rule that determines whether a transition will occur or not between two states. The tag corresponds to an instance of the Transition class (org.jharks.workflow.Rule).
Attributes of the <rule> tag:
- type: the Java class that contains the implementation of the Rule subclass. The class specified must be a subclass of org.jharks.workflow.Rule.</rule></rule>

   Configurable tags allowed within <rule/> tag:
    <rule-condition/> 0 or more

The <rule-condition> tag models a configurable generic condition to be applied within the configured Rule instance. The tag corresponds to an instance of the Transition class (org.jharks.workflow.RuleCondition).
Attributes of the <rule> tag:
- type: the Java class that contains the implementation of the RuleCondition subclass. The class specified must be a subclass of org.jharks.workflow.RuleCondition</rule></rule-condition>

   Configurable tags allowed within <rule/> tag:
    <property> 0 or more

The <property> tag is an inner tag of the <rule-condition> tag only. The tag is used to set an attribute on the implementation of the RuleCondition. The implementator/configuration manager must insure that the property being set in the configuration matches an appropriate attribute with getter/setter methods within the RuleCondition implementation.
Attributes of the <property> tag:
- name: the name of the property to set.</property></rule-condition></property>

  • value: the value of the named property.

    Configurable tags allowed within <property> tag:
    None. </property>


Related

Wiki: Home

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.