Introduction
The SMARTFlow-StateEngine is a workflow component that can manage the state of many entities of interest for external systems. These entities will be generically referred to as tasks. This component is designed to be as generic as possible so that it can manage the state of different task types and configure all the states through which each task will pass in its lifecycle. Apart from being able to set the possible states of each task, there are another two configurable aspects. On the one hand, external systems will communicate with the SMARTFLOW-StateEngine through external events. The external events will be able to cause a change of state in the task on which they act. On the other, each of the changes of state will possibly lead to the execution of a number of actions. These actions may affect the actual state of the task or other parts of the system apart from the state engine. The engine can configure both the management of the events that it receives from the outside and the actions to be executed. The SMARTFlow-StateEngine component is consequently highly flexible and configurable.
To model all the states through which a task can go, we used the formal Petri Nets model. Petri Nets are a generalization of automata theory thanks to which it is possible to model concurrent and/or non-deterministic dynamic systems. This makes it possible to contemplate models that would not have been possible using other simpler dynamic systems like deterministic finite automata.
The system will be composed of three basic modules:
- Events Transformation Module, ETM.
This module transforms the external event and gets a list of valid transition identifiers within the Petri net that models the workflow to which the task is subject. - State Management Module, SMM.
This module sends the identifier of its associated net and the transitions enabled in the earlier phase to get the new state and action execution list. While Petri nets do make provision for non-determinism, this execution will be performed sequentially and deterministically in view of the features of the systems on which this component is to be used. - Action Execution Module, AEM.
This module is responsible for the actions associated with the change of state obtained from the SMM.

Overview of the SMARTFlow-StateEngine’s General Features
- The system can dynamically manage multiple workflows and different entities of interest associated with those flows (tasks)
- The system can define the set of states and transitions between states using an XML-based language.
- The system can define the change of state as a series of events.
- The system can specify a set of actions to be executed depending on the state of the tasks.
- Petri Net-based workflow modelling
- Modelling of actions and transformations associated with workflows
- Reporting of system events
- Create task
- Execute event processing
- Pause task
- Restart task
- Destroy task
- Modify external task data
- Modify action task data
- Modify exception task data
Key technologies used in the SMARTFlow-StateEngine component
- Component 100% implemented in Java
- Platform independence, lower development cost, dynamic language aspects…
- Use of CORBA technology
- Use of TIDorbJ component to provide a CORBA interface with the key objects
- Ease of thread and request management through ORB
- XML
- Definition of workflows and business processes…
- SQL / JDBC
- Internal SMARTFlow-StateEngine data persistency
- External task-associated data persistency



