• No se han encontrado resultados

ESTADO DE AVANCE DE LA INCORPORACIÓN DE POLONIA AL EURO

Tabla 5: TESTS DE DEPENDENCIA SERIAL NO LINEAL :TIPOS DE CAMBIO

PROCESO DE ADOPCION DEL EURO

B.- ESTADO DE AVANCE DE LA INCORPORACIÓN DE POLONIA AL EURO

Interaction with a user is necessary when dealing with emergencies. This is solved within BPMN 2.0 by means of User Tasks [16]. User Task creation depends on the chosen architecture, the jBPM in this case. The architecture chosen supports the use of human tasks inside processes using a special user task. A user task node represents an atomic task that needs to be executed by a human actor [7]. Although jBPM has a special user task node for including human tasks inside a process, human tasks are considered the same as any other kind of external service that needs to be invoked and are therefore simply implemented as a domain-specific service. To have human actors participate in the processes, it is needed to [8]:

- Include human task nodes inside the process to model the interaction with human actors;

- Integrate a task management component;

- Have end users interact with a human task client to request their task list and claim and complete the tasks assigned to them.

As an example of a Service Automation in the form of a User Task, an activity called Commencing of the solution of the

Emergency was chosen. This activity

proceeds the Notification of Emergency and the Summoning of the Emergency Staff. The activity is described in BPMN 2.0. The element describing the task looks as follows:

<userTask id="_5-7" name="Zahajeni reseni KS _ Starosta" >

To ensure correct form display and task function, it is necessary to pass over the data entered by the user. This means that the required data is copied from the process variables to the task parameters. Once the task finishes, the results are then returned by means of mapping to the process variables. A script in Java programming language is used for this purpose. This script is launched upon the start or finish of the task. An example of the script for manipulation with the entered data is shown below.

<extensionElements> <tns:onExit-script

scriptFormat="http://www.java.com/java"> <script>

ukolySeznam = new java.util.ArrayList(); ukolyPrirazeni = new java.util.HashMap(); if ("y".equals(u1resit)) {

ukolySeznam.add("Vyrozumeni");

50

}

if ("y".equals(u2resit)) {

ukolySeznam.add("Varovani obyvatel");

ukolyPrirazeni.put("Varovani obyvatel", u2Actor); } kcontext.setVariable("ukolySeznam", ukolySeznam); kcontext.setVariable("ukolyPrirazeni", ukolyPrirazeni); </script> </tns:onExit-script> </extensionElements>

First of all, the assignment of individual tasks to users is evaluated and these results are assigned into the corresponding data structures, which are then assigned into the process variables. The input and output variables have to be mapped. At the end, it is possible to assign the User Task created to a concrete user, in this case to the Mayor.

<potentialOwner>

<resourceAssignmentExpression>

<formalExpression>starosta</formalExpression> </resourceAssignmentExpression>

</potentialOwner>

Consequently, the human task service needs to be integrated with the jBPM engine just like any other external service. This is done by registering a work item handler that is responsible for translating the abstract work item (in this case a human task) to a specific

invocation of a service [8]. It is done by registering WSHuman-TaskHandler as prsented in the following code:

KnowledgeBase kbase = readKnowledgeBase(); StatefulKnowledgeSession ksession =

base.newStatefulKnowledgeSession();

ksession.getWorkItemManager().registerWorkItemHa ndler("Human Task", new WSHumanTaskHandler());

By default, this handler will connect to a human task service on the local machine on port 9123. The address and port of the human task service can easily be changed. This service should be used by invoking the setConnection(ipAddress,

port) method on the WS Human Task

Handler.

To ensure the interaction with the end users, jBPM Console is used. This is a tool for interaction of the running processes (User Tasks) with the user. Business processes and Human Tasks can be managed through this web console. There is an example of a form for starting the response to the emergency by the Mayor (Fig. 5). The names of the variables that can be seen in the individual fields will be replaced with their values in runtime.

Figure5: User Interface for Human Task

4.1. Key Performance Indicators

Business Activity Monitoring (BAM)

tools are used for Implementation of the Key Performance Indicators (KPI). All

the aspects of introducing KPI – from definition of the data gathered by monitoring until the display of the KPI – are described in the next part. At

51 first, the principles of the data storage

that will be used for getting the KPI are described by means of History log. The BAM rules for jBPM are then used to manipulate and display the KPIs.

In many cases, it is useful to store information about the execution of process instances, so that this information can be used afterwards. Storing history information in the runtime database is usually not a good idea, as this would result in ever- growing runtime data. Furthermore, monitoring and analysis queries might influence the performance of the runtime engine [8]. That is why historical information about the execution of the process instances is stored separately in History Log. The History Log of execution information is created based on the events generated by the process engine during execution. The jBPM runtime engine provides a generic mechanism to listen to different kinds of events. The necessary information can easily be extracted from these events and persisted, for example in a database. Filters can be used to store only the relevant information.

The jBPM-BAM module contains an event listener that stores process-related information in a database using Java Persistence API (JPA) or Hibernate directly. The database contains two tables; one for Process Instance

Information and one for Node Instance Information [8]:

ProcessInstanceLog: This contains the

process instance id, the process (definition) id, the start date and (if applicable) the end date of all process instances.

NodeInstanceLog: This table contains

more detailed information about which nodes were actually executed inside each process instance. Whenever a node

instance is entered from one of its incoming connections or is exited through one of its outgoing connections, that information is stored in this table. To achieve this, it stores the process instance id and the process id of the process instance it is being executed in, and the node instance id and the corresponding node id (in the process definition) of the node instance in question. Finally, the type of event (0 = enter, 1 = exit) and the date of the event is stored as well.

Business Activity Monitoring is related to

the real-time monitoring of the processes and introduces a possibility to intervene directly (possibly even automatically), based on the analysis of these events. Drools Flow allows users to define reports based on the events generated by the process engine, and makes it possible to directly intervene in specific situations using event processing rules (Drools Fusion). Based on the Eclipse BIRT

plug-in (Business Intelligence Reporting

Tool), users can create reports that show the KPIs of their business. It is easy for the users to even define custom reports using the predefined data sets containing all process history information (based on history logger that logs all runtime events in a database).

By adding a history logger to the process engine, all relevant events can be stored in a database. This history log can be used to monitor and analyze the execution of the processes. Drools Flow uses the Eclipse BIRT (Business Intelligence Reporting Tool) to create reports that show the KPIs. The Eclipse BIRT framework allows the user to define data sets, create reports, include charts, preview the reports, and export them on web pages. The following screen shot shows a sample on how to create such a chart (Fig. 6).

52

Figure 6: Drools Eventing Report [8]

4.2. Service Outsourcing

It was found desirable to be able to use the existing systems or portals for automation of the modelled processes. As there is only a small amount of functioning services within the Emergency Management that could be integrated with the system, it was necessary to use the systems that do not have any interfaces exposed [11]. The following systems within the paper were primarily used:

System for Modeling of the Leakage of the Dangerous Substances – a system,

which makes it possible to predict a leakage of dangerous substance based on the supplied parameters. In the Czech Republic, the systems most commonly used are called TerEx or Aloha. Once the parameters are entered, a predicted model is created in the form of text output and map. This information can directly be used in the system developed.

Integrated Warning Service System – a

service provided by the Czech Hydrometeorological Institute that serves to inform the public and Emergency Management Bodies about warnings declared for the Czech Republic.

Geographical Information System – a

standard add-on to each of the Emergency Management information system, which makes it possible to illustrate emergencies being dealt with on a map. Contextual mapping service

was used within the Proof of Concept. It enables the user to display the situation in a given context.

Transport Information System – system

used when there is a leakage of hazardous substances related to transportation. The system is administered by the Ministry of Transport. It makes benefit of labels that are required by law to be present on the containers with the substances. These make for a quick identification of the transported substance, which helps to improve the efficiency of the response to the emergency.