35
GRUPPO TELECOM ITALIA TELECOM ITALIA – CONFIDENZIALE WADE Workflow and Agents Development Environment

WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

GRUPPO TELECOM ITALIA TELECOM ITALIA – CONFIDENZIALE

WADEWorkflow and Agents Development Environment

Page 2: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

� JADE Basics

� WADE & JADE

� Real-world application examples

� WADE Architecture

� Workflows

� Events

� Workflow-driven Interactivity

Outline

Page 3: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

JADE

AGREE

� Publish-subscribe discoverydiscoverydiscoverydiscovery

mechanism

� FullyFullyFullyFully writtenwrittenwrittenwritten inininin JavaJavaJavaJava

� OpenOpenOpenOpen SourceSourceSourceSource

� http://jade.tilab.com

� > 270.000 download

� Current version: 4444....1111....2222

� AAAA frameworkframeworkframeworkframework totototo developdevelopdevelopdevelop distributeddistributeddistributeddistributed applicationsapplicationsapplicationsapplications basedbasedbasedbased onononon thethethethe agentagentagentagent----orientedorientedorientedoriented

paradigmparadigmparadigmparadigm

�AgentAgentAgentAgent and BehaviourBehaviourBehaviourBehaviour (a task that can be executed by an agent) abstractions

� Transparent distributiondistributiondistributiondistribution of components

� PeerPeerPeerPeer----totototo----peerpeerpeerpeer communicationcommunicationcommunicationcommunication based on asynchronous message passing

Page 4: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

Architecture

JADE

Container

Container

Main

ContainerPLATFORM

AMS DF

PLATFORM 2

JADE

AMS DF

Main Container

JADE JADE

host1

host2 host3

host4

Page 5: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

Communication model

A1 A2

Prepare the message to A2

Get the message from the message queue and process it

JADE distributed runtime

(PROPOSE(PROPOSE(PROPOSE(PROPOSE

:sender A1:sender A1:sender A1:sender A1

:receiver A2:receiver A2:receiver A2:receiver A2

:content “Cinema evening”:content “Cinema evening”:content “Cinema evening”:content “Cinema evening”

:language “English”:language “English”:language “English”:language “English”

:ontology “Cinema:ontology “Cinema:ontology “Cinema:ontology “Cinema----ontology” )ontology” )ontology” )ontology” )

� Based on assynchronous message passing

� Message format is defined by the ACL language (specified by FIPA)

Page 6: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

Task execution and composition

� An agent either "sleeps" or executes tasks (Behaviour)

� Simple behaviours

� Method action() : Specifies what the task does

� Method done() : Specifies the task termination condition

� Composite behaviours

B1

B2

B3

B1 B2 B3

B1

B2B4

B3

SequentialBehaviour

ParallelBehaviour

FSMBehaviour

Page 7: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

The yellow pages service

A1: - serviceX

- serviceY

A2: - serviceZ

A3: - serviceW

- serviceK

- serviceH

Yellow Pages service

Publish

provided

services

A1

A2

A3

A4

A5

A6

Search for

agents

providing the

required

services

Exploit required

service

DF

Page 8: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

8

TELECOM ITALIA

� IsIsIsIs anananan extensionextensionextensionextension ofofofof JADEJADEJADEJADE

� A WADE-based system is also a JADE-based system

� All JADE features are available in WADE too

� AddsAddsAddsAdds totototo JADEJADEJADEJADE

� The possibility of defining agent tasks according to the workflowworkflowworkflowworkflow metaphor

� Not a unique big workflow engine, but many “micro-workflow engines”

embedded into agents

� Components and mechanisms that facilitate the administrationadministrationadministrationadministration of a WADE-

based application

� The two aspects may be used separately

� OpenOpenOpenOpen SourceSourceSourceSource sincesincesincesince MayMayMayMay 2008200820082008

� http://jade.tilab.com/wade

� Current version: 3333....1111

WADE

Page 9: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

9

TELECOM ITALIA

How to use WADE

� AsAsAsAs aaaa DevelopmentDevelopmentDevelopmentDevelopment FrameworkFrameworkFrameworkFramework

� Creation of a complete agent-based

application whose main components

are implemented as domain-specific

agents

� Some of the application business logics

(agent tasks) can be implemented as

workflows

� AsAsAsAs WorkflowWorkflowWorkflowWorkflow EngineEngineEngineEngine

�WADE is used as an engine to execute

workflows inside a non-agent-based

system

�WADE is seen as a black-box

� It is accessed through a well-defined API (EngineProxy)

�Agents inside WADE are invisible to the rest of the

system

A2

A1

A3

A4

A5

WADE

Page 10: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

10

TELECOM ITALIA

Main WADE-based applications in Telecom Italia

� WANTSWANTSWANTSWANTS –––– ActivationActivationActivationActivation systemsystemsystemsystem forforforfor allallallall BroadBandBroadBandBroadBandBroadBand servicesservicesservicesservices ofofofof TITITITI

� WIZARDWIZARDWIZARDWIZARD –––– OperationOperationOperationOperation supportsupportsupportsupport systemsystemsystemsystem thatthatthatthat guidesguidesguidesguides TITITITI technicianstechnicianstechnicianstechnicians (both(both(both(both inininin

fieldfieldfieldfield andandandand inininin backbackbackback office)office)office)office) inininin installationinstallationinstallationinstallation andandandand maintenancemaintenancemaintenancemaintenance proceduresproceduresproceduresprocedures

� WANTSWANTSWANTSWANTS----AssuranceAssuranceAssuranceAssurance –––– MonitoringMonitoringMonitoringMonitoring andandandand optimizationoptimizationoptimizationoptimization systemsystemsystemsystem forforforfor XDSLXDSLXDSLXDSL lineslineslineslines

� WeMashWeMashWeMashWeMash –––– WebWebWebWeb basedbasedbasedbased environmentenvironmentenvironmentenvironment thatthatthatthat allowsallowsallowsallows TITITITI technicianstechnicianstechnicianstechnicians creatingcreatingcreatingcreating

simplesimplesimplesimple applicationsapplicationsapplicationsapplications (mash(mash(mash(mash----up)up)up)up) onononon----thethethethe----flyflyflyfly totototo automatizeautomatizeautomatizeautomatize sequencessequencessequencessequences ofofofof

operationsoperationsoperationsoperations

� WorkflowWorkflowWorkflowWorkflow EngineEngineEngineEngine totototo executeexecuteexecuteexecute orderorderorderorder managementmanagementmanagementmanagement flowsflowsflowsflows insideinsideinsideinside thethethethe MarketMarketMarketMarket----

PlacePlacePlacePlace platformplatformplatformplatform availableavailableavailableavailable onononon TITITITI CloudCloudCloudCloud

Page 11: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

11

TELECOM ITALIA

An example: WANTS-Assurance (1/2)

WANTSWANTSWANTSWANTS----AssuranceAssuranceAssuranceAssurance

� LineLineLineLine statusstatusstatusstatus monitoringmonitoringmonitoringmonitoring

�WORKING

� POWER-OFF

� NOT_WORKING

LineLineLineLine----profile:profile:profile:profile:•BitrateBitrateBitrateBitrate

•Noise marginNoise marginNoise marginNoise margin

•Impulse noise protectionImpulse noise protectionImpulse noise protectionImpulse noise protection

•............

� LineLineLineLine qualityqualityqualityqualityoptimizationoptimizationoptimizationoptimization

100m 100m 100m 100m –––– 4 Km 4 Km 4 Km 4 Km

Page 12: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

12

TELECOM ITALIA

An example: WANTS-Assurance(2/2)

NHNHNHNH

RPRPRPRP RPRPRPRP RPRPRPRP RPRPRPRP RPRPRPRP

WANTSWANTSWANTSWANTS----AssuranceAssuranceAssuranceAssurance

If line quality is below If line quality is below If line quality is below If line quality is below

a given thresholda given thresholda given thresholda given threshold

---- Perform additional Perform additional Perform additional Perform additional

measurements measurements measurements measurements

---- Run algorithm to Run algorithm to Run algorithm to Run algorithm to

identify optimal identify optimal identify optimal identify optimal

profileprofileprofileprofile

---- Interact with the Interact with the Interact with the Interact with the

Activation system to Activation system to Activation system to Activation system to

set the new profileset the new profileset the new profileset the new profile

---- Trace line quality in Trace line quality in Trace line quality in Trace line quality in

successive dayssuccessive dayssuccessive dayssuccessive days

100m 100m 100m 100m –––– 4 Km 4 Km 4 Km 4 Km

Page 13: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

13

TELECOM ITALIA

Main WADE specific components

� BootBootBootBoot DaemonDaemonDaemonDaemon ((((1111 xxxx host)host)host)host)

� Non-agent process responsible for the activation of containers in the local host

� ConfigurationConfigurationConfigurationConfiguration AgentAgentAgentAgent –––– CFACFACFACFA ((((1111 onononon thethethethe MainMainMainMain Container)Container)Container)Container)

� The agent responsible to manage the startup and shutdown of the system

(interacting with BootDaemons)

� ControllerControllerControllerController AgentAgentAgentAgent –––– CACACACA ((((1111 xxxx container)container)container)container)

� The agents responsible to manage the resources in each container.

� Implement the fault tolerance mechanisms

� WorkflowWorkflowWorkflowWorkflow EngineEngineEngineEngine AgentAgentAgentAgent –––– WEAWEAWEAWEA (n)(n)(n)(n)

� WorkflowWorkflowWorkflowWorkflow StatusStatusStatusStatus ManagerManagerManagerManager AgentAgentAgentAgent –––– WSMAWSMAWSMAWSMA ((((1111))))

� The agent responsible to trace workflow executions

� EventEventEventEvent SystemSystemSystemSystem AgentAgentAgentAgent –––– ESAESAESAESA ((((1111))))

� The agent implementing the event mechanism that allows WFs to suspend

waiting for events

Page 14: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

14

TELECOM ITALIA

HOST1 HOST2 HOST3

Boot Daemon Boot Daemon Boot Daemon

Container-1

Container-2 Container-3

Container-4

Container-5

Container-6

CA

CA CA

CA

CA

CA

Application

specific agents

Application

specific agents

Application

specific agents

Application

Agents

Main-Container

AMS DFCFA

Administration

ConsoleArchitecture

Page 15: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

15

TELECOM ITALIA

<platform description="This is a sample configuration" name="Sample">

<hosts>

<host name="localhost">

<containers>

<container name="Execution-Node">

<agents>

<agent name="performer1" type=“Workflow Engine Agent"/>

<agent name="performer2" type="Workflow Engine Agent"/>

</agents>

</container>

<container name=“Administration-Node">

<agents>

<agent name=“wsma" type="Workflow Status Manager Agent"/>

<agent name=“esa" type=“Event System Agent"/>

</agents>

</container>

</containers>

</host>

</hosts>

<agentPools>

<agentPool name=“foo” type=“My Type” size=“100”/>

<agentPools>

</platform>

Application configuration file

Page 16: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

16

TELECOM ITALIA

Agent types definition (types.xml)

<platform>

...

<agentTypes>

<AgentType description="Configuration Agent"

className="com.tilab.wade.cfa.ConfigurationAgent">

<properties>

<Property name="configurationsPath" value="${project-home}/cfg/configuration"/>

...

</properties>

</AgentType>

<AgentType description="Control Agent"

className="com.tilab.wade.ca.ControllerAgent">

<properties>

<Property name="autorestart" value="true"/>

...

</properties>

</AgentType>

<AgentType description="Workflow Engine Agent"

className="com.tilab.wade.performer.WorkflowEngineAgent">

</AgentType>

...

</agentTypes>

....

</platform>

Page 17: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

17

TELECOM ITALIA

The WADE Suite

WADE (Distributed workflow engine)

ExecutionsWOLF(Development

Environment)

WADE

Persistence

Add-on

DESIGN TIME

RUN TIME

WADE

Admin

Console

Systems using

WADE as WE

EngineProxy

EngineProxy EngineProxy EngineProxy

WADE

Services

Java APIJava APIJava APIJava API

Rest APIRest APIRest APIRest API

ACLACLACLACL

ACLACLACLACL ACLACLACLACL ACLACLACLACL

WADE

Interface

Systems using

WADE as WEExternal

Systems

WS SOAPWS SOAPWS SOAPWS SOAP

AdministratorAdministratorAdministratorAdministrator

DeveloperDeveloperDeveloperDeveloper

Page 18: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

18

TELECOM ITALIA

Workflow

� AAAA workflowworkflowworkflowworkflow isisisis thethethethe formalformalformalformal definitiondefinitiondefinitiondefinition ofofofof aaaa processprocessprocessprocess inininin termstermstermsterms ofofofof activitiesactivitiesactivitiesactivities totototo

bebebebe executed,executed,executed,executed, relationsrelationsrelationsrelations betweenbetweenbetweenbetween them,them,them,them, criteriacriteriacriteriacriteria thatthatthatthat specifyspecifyspecifyspecify thethethethe activationactivationactivationactivation

andandandand terminationterminationterminationtermination andandandand otherotherotherother informationinformationinformationinformation suchsuchsuchsuch asasasas possiblepossiblepossiblepossible inputsinputsinputsinputs andandandand

outputs,outputs,outputs,outputs, toolstoolstoolstools thatthatthatthat mustmustmustmust bebebebe used/invoked,used/invoked,used/invoked,used/invoked, participants,participants,participants,participants, datadatadatadata totototo bebebebe

manipulatedmanipulatedmanipulatedmanipulated duringduringduringduring thethethethe executionexecutionexecutionexecution andandandand sosososo onononon

� AAAA WorkflowWorkflowWorkflowWorkflow EngineEngineEngineEngine isisisis aaaa softwaresoftwaresoftwaresoftware tooltooltooltool ableableableable totototo automaticallyautomaticallyautomaticallyautomatically executeexecuteexecuteexecute

processesprocessesprocessesprocesses defineddefineddefineddefined asasasas workflowsworkflowsworkflowsworkflows....

� AdvantagesAdvantagesAdvantagesAdvantages

� Graphical representation

� Self-documented

�Management and tracing of executions

� Hot modification

� Execution steps are made explicit � (semi) automatic rollback

mechanisms

Page 19: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

19

TELECOM ITALIA

The graphical editor WOLF

Definition of process execution flow

Definition of implementation details inside execution steps

SynchronizedSynchronizedSynchronizedSynchronized

Java Editor Workflow Editor

A WADE WF is a Java class

Page 20: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

20

TELECOM ITALIA

Wolf main features

� GraphicalGraphicalGraphicalGraphical creationcreationcreationcreation andandandand editingeditingeditingediting ofofofof WorkflowsWorkflowsWorkflowsWorkflows

� SettingSettingSettingSetting ofofofof aaaa projectprojectprojectproject forforforfor aaaa WADEWADEWADEWADE----basedbasedbasedbased applicationapplicationapplicationapplication

� Classpath setting

� Configurations

� QuickQuickQuickQuick----launch/debuglaunch/debuglaunch/debuglaunch/debug ofofofof aaaa WorkflowWorkflowWorkflowWorkflow

� ConnectionConnectionConnectionConnection totototo aaaa remoteremoteremoteremote WADEWADEWADEWADE----basedbasedbasedbased systemsystemsystemsystem

�Minimal administration features

�Workflow deployment

�Workflow execution

Page 21: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

21

TELECOM ITALIA

Main activity types

� CodeActivityCodeActivityCodeActivityCodeActivity –––– InvocationInvocationInvocationInvocation ofofofof aaaa piecepiecepiecepiece ofofofof useruseruseruser

defineddefineddefineddefined JavaJavaJavaJava codecodecodecode

� WebServiceActivityWebServiceActivityWebServiceActivityWebServiceActivity –––– InvocationInvocationInvocationInvocation ofofofof aaaa WSWSWSWS

� Full support for security

� SubflowActivitySubflowActivitySubflowActivitySubflowActivity –––– ExecutionExecutionExecutionExecution ofofofof anotheranotheranotheranother WFWFWFWF

� Inline

� Synchronous

� Asynchronous

� Independent

� WaitWaitWaitWait ActivityActivityActivityActivity –––– SuspendSuspendSuspendSuspend thethethethe WFWFWFWF waitingwaitingwaitingwaiting forforforfor

somethingsomethingsomethingsomething

�Wait WS

�Wait custom event

� ConditionalConditionalConditionalConditional blocksblocksblocksblocks

Page 22: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

22

TELECOM ITALIA

public class CoffeeWorkflow extends WorkflowBehaviour {public class CoffeeWorkflow extends WorkflowBehaviour {public class CoffeeWorkflow extends WorkflowBehaviour {public class CoffeeWorkflow extends WorkflowBehaviour {

................

private void defineActivities() {private void defineActivities() {private void defineActivities() {private void defineActivities() {

registerActivity(new CodeExecutionBehaviour(this, “Check”) , INITIAL);registerActivity(new CodeExecutionBehaviour(this, “Check”) , INITIAL);registerActivity(new CodeExecutionBehaviour(this, “Check”) , INITIAL);registerActivity(new CodeExecutionBehaviour(this, “Check”) , INITIAL);

registerActivity(new CodeExecutionBehaviour(this, “Make”));registerActivity(new CodeExecutionBehaviour(this, “Make”));registerActivity(new CodeExecutionBehaviour(this, “Make”));registerActivity(new CodeExecutionBehaviour(this, “Make”));

registerActivity(new CodeExecutionBehaviour(this, “Error”), FINAL);registerActivity(new CodeExecutionBehaviour(this, “Error”), FINAL);registerActivity(new CodeExecutionBehaviour(this, “Error”), FINAL);registerActivity(new CodeExecutionBehaviour(this, “Error”), FINAL);

registerActivity(new CodeExecutionBehaviour(this, “Pour”) , FINAL);registerActivity(new CodeExecutionBehaviour(this, “Pour”) , FINAL);registerActivity(new CodeExecutionBehaviour(this, “Pour”) , FINAL);registerActivity(new CodeExecutionBehaviour(this, “Pour”) , FINAL);

}}}}

................

private void defineTransitions() {private void defineTransitions() {private void defineTransitions() {private void defineTransitions() {

registerTransition(new Transition(this, “EnoughCoffee”), “Check”, “Make”);registerTransition(new Transition(this, “EnoughCoffee”), “Check”, “Make”);registerTransition(new Transition(this, “EnoughCoffee”), “Check”, “Make”);registerTransition(new Transition(this, “EnoughCoffee”), “Check”, “Make”);

registerTransition(new Transition(), “Check”, “Error”);registerTransition(new Transition(), “Check”, “Error”);registerTransition(new Transition(), “Check”, “Error”);registerTransition(new Transition(), “Check”, “Error”);

registerTransition(new Transition(), “Make”, “Pour”);registerTransition(new Transition(), “Make”, “Pour”);registerTransition(new Transition(), “Make”, “Pour”);registerTransition(new Transition(), “Make”, “Pour”);

}}}}

…………

protected void executeCheck() {protected void executeCheck() {protected void executeCheck() {protected void executeCheck() {

}}}}

…………

protected void executeMake() {protected void executeMake() {protected void executeMake() {protected void executeMake() {

}}}}

…………

protected void executePour() {protected void executePour() {protected void executePour() {protected void executePour() {

}}}}

................

protected void executeError() {protected void executeError() {protected void executeError() {protected void executeError() {

}}}}

…………

protected boolean checkEnoughCoffee() {protected boolean checkEnoughCoffee() {protected boolean checkEnoughCoffee() {protected boolean checkEnoughCoffee() {

}}}}

}}}}

Workflow class

CoffeeWorkflow

Make

Check

Pour

Error

Enough Coffee

Page 23: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

23

TELECOM ITALIA

� WorkflowWorkflowWorkflowWorkflow���� JavaJavaJavaJava classclassclassclass thatthatthatthat extendsextendsextendsextends WorkflowBehaviour

� ActivityActivityActivityActivity����

� void Method of the workflow class

� Behaviour registered to the Workflow object responsible to invoke the

activity method with proper parameters depending on the type of activity

� TransitionTransitionTransitionTransition����

� boolean Method of the workflow class implementing the condition (if

any)

� Transition object responsible to invoke the condition method when the

condition (if any) must be evaluated

� FormalFormalFormalFormal ParametersParametersParametersParameters ���� WorkflowWorkflowWorkflowWorkflow classclassclassclass fieldsfieldsfieldsfields annotatedannotatedannotatedannotated bybybyby meansmeansmeansmeans ofofofof thethethethe@FormalParameter annotationannotationannotationannotation

� AllAllAllAll informationinformationinformationinformation relatedrelatedrelatedrelated totototo thethethethe appearanceappearanceappearanceappearance ofofofof thethethethe workflowworkflowworkflowworkflow (activity(activity(activity(activitypositions,positions,positions,positions, labels,labels,labels,labels, notesnotesnotesnotes............)))) defineddefineddefineddefined bybybyby meansmeansmeansmeans ofofofof thethethethe @WorkflowLayout

annotationannotationannotationannotation

Elements of a Workflow class

Page 24: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

24

TELECOM ITALIA

WADE Workflow Engine main characteristics

� AAAA WADEWADEWADEWADE WFWFWFWF isisisis implementedimplementedimplementedimplemented bybybyby aaaa JavaJavaJavaJava classclassclassclass

� Very efficient (no runtime interpretation of XML or similar formats )

� Full control in the implementation of business logics

� Synchronized graphical view and code view

� ScalabilityScalabilityScalabilityScalability

� Natively distributed engine based on the agent oriented paradigm

� WFWFWFWF deploymentdeploymentdeploymentdeployment

�WF must be deployed before they can be executed

� Deployment mechanism based on ad-hoc ClassLoader

� InheritanceInheritanceInheritanceInheritance

� Possibility to define new WF starting from existing ones and specifying the

differences

Page 25: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

25

TELECOM ITALIA

� ShortShortShortShort----runningrunningrunningrunning –––– statelessstatelessstatelessstateless:::: dodododo notnotnotnot survivesurvivesurvivesurvive totototo thethethethe shutdownshutdownshutdownshutdown ofofofof thethethethe systemsystemsystemsystem

� Typically short execution time (seconds or minutes)

� CPU-consuming� Require strong efficiency

� LongLongLongLong runningrunningrunningrunning –––– statefullstatefullstatefullstatefull:::: survivesurvivesurvivesurvive totototo thethethethe shutdown/restartshutdown/restartshutdown/restartshutdown/restart ofofofof thethethethe systemsystemsystemsystem

� Typically long execution time (hours/days/months)

� Save the execution state at each step

� NOTENOTENOTENOTE:::: ShortShortShortShort----RunningRunningRunningRunning WFFWFFWFFWFF cancancancan suspendsuspendsuspendsuspend waitingwaitingwaitingwaiting forforforfor eventseventseventsevents

Short-Running and Long Running WF

Page 26: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

26

TELECOM ITALIA

Event mechanism

Event Event Event Event

ChannelChannelChannelChannel

Event Event Event Event

ChannelChannelChannelChannel

Event Event Event Event

ChannelChannelChannelChannel

JMS BusJMS BusJMS BusJMS Bus

Web Service callWeb Service callWeb Service callWeb Service call

Smoke signSmoke signSmoke signSmoke sign

Event Event Event Event

System System System System

AgentAgentAgentAgent

Workflow Engine AgentsWorkflow Engine AgentsWorkflow Engine AgentsWorkflow Engine Agents

SUBSCRIBESUBSCRIBESUBSCRIBESUBSCRIBE

INFORMINFORMINFORMINFORM

JMS messages JMS messages JMS messages JMS messages

reception module reception module reception module reception module

(custom)(custom)(custom)(custom)

Incoming WS Incoming WS Incoming WS Incoming WS

reception module reception module reception module reception module

(WadeServices)(WadeServices)(WadeServices)(WadeServices)

Smoke sign Smoke sign Smoke sign Smoke sign

reception module reception module reception module reception module

(custom)(custom)(custom)(custom)

GenericEventGenericEventGenericEventGenericEvent

GenericEventGenericEventGenericEventGenericEvent

GenericEventGenericEventGenericEventGenericEvent

Each GenericEvent has a Each GenericEvent has a Each GenericEvent has a Each GenericEvent has a

type and some parameters type and some parameters type and some parameters type and some parameters

(key(key(key(key----value pairs)value pairs)value pairs)value pairs)

When a WF blocks, it specifies When a WF blocks, it specifies When a WF blocks, it specifies When a WF blocks, it specifies

an event type and possibly an an event type and possibly an an event type and possibly an an event type and possibly an

expression that identifies the expression that identifies the expression that identifies the expression that identifies the

specific event that the WF is specific event that the WF is specific event that the WF is specific event that the WF is

waiting forwaiting forwaiting forwaiting for

Page 27: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

27

TELECOM ITALIA

Suspended WF wakeup

� EachEachEachEach timetimetimetime thethethethe ESAESAESAESA receivesreceivesreceivesreceives anananan event,event,event,event, itititit checkscheckscheckschecks itititit againstagainstagainstagainst thethethethe

registrationsregistrationsregistrationsregistrations ofofofof allallallall suspendedsuspendedsuspendedsuspended WFsWFsWFsWFs andandandand wakeswakeswakeswakes upupupup allallallall WFsWFsWFsWFs whosewhosewhosewhose

registrationregistrationregistrationregistration matchesmatchesmatchesmatches thethethethe receivedreceivedreceivedreceived eventeventeventevent....

� TheTheTheThe eventeventeventevent isisisis passedpassedpassedpassed totototo allallallall resumedresumedresumedresumed WFsWFsWFsWFs

� EventsEventsEventsEvents havehavehavehave aaaa TimeTimeTimeTime----totototo----livelivelivelive.... TheTheTheThe ESAESAESAESA keepskeepskeepskeeps themthemthemthem foreforeforefore thatthatthatthat timetimetimetime beforebeforebeforebefore

removingremovingremovingremoving themthemthemthem

� ReceptionReceptionReceptionReception modulesmodulesmodulesmodules

�WADE provides a ready made module (WadeServices) that allows exposing

a WS defined by a WSDL. Each time the exposed WS is invoked a suitable

event is automatically submitted.

� Custom Events can be defined and submitted to the system by means of

the EventChannel API. For instance one can develop a module that receives

SMS and submits a GenericEvent carrying sender and text as parameters.

Page 28: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

28

TELECOM ITALIA

Custom event definition

<platform>

...

<agentTypes>

...

</agentTypes>

<customEventTypes>

<EventType description="WorkRequestCompletata">

<parameters>

<Parameter name="wrId" type="java.lang.String"/>

<Parameter name="esito"

type="com.tilab.wfm.EsitoWR"/>

</parameters>

</EventType>

</customEventTypes>

</platform>

Page 29: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

29

TELECOM ITALIA

WadeServices

WEB CONTAINERWEB CONTAINERWEB CONTAINERWEB CONTAINER

WadeServices WadeServices WadeServices WadeServices

web appweb appweb appweb app

GW GW GW GW

AgentAgentAgentAgent

PLATFORMPLATFORMPLATFORMPLATFORM

WOLFWOLFWOLFWOLF

Import WSDLImport WSDLImport WSDLImport WSDL

WF DefinitionWF DefinitionWF DefinitionWF Definition

Design timeDesign timeDesign timeDesign timeDeploy/ExposeDeploy/ExposeDeploy/ExposeDeploy/Expose

Deploy timeDeploy timeDeploy timeDeploy time

ExecuteExecuteExecuteExecute

InvokeInvokeInvokeInvoke

Run timeRun timeRun timeRun time

Run timeRun timeRun timeRun time

---- Service Service Service Service descriptiondescriptiondescriptiondescription classclassclassclass

---- Beans corresponding to types of Beans corresponding to types of Beans corresponding to types of Beans corresponding to types of complex complex complex complex

parametersparametersparametersparameters

---- SkeletonSkeletonSkeletonSkeleton that issues events following that issues events following that issues events following that issues events following

each invocations of WS operationseach invocations of WS operationseach invocations of WS operationseach invocations of WS operations

WaitWebServiceActivityWaitWebServiceActivityWaitWebServiceActivityWaitWebServiceActivity

GenericEventGenericEventGenericEventGenericEvent

Page 30: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

30

TELECOM ITALIA

WADE distribution structure

wade

|---…

|---bin/

|---startBootDaemon

|---startMain

|---…

|---cfg/

|---main.properties

|---types.xml

|---...

|---configurations/

|---sample.xml

|---...

|---lib/

|---wade.jar

|---jade.jar

|...

|---log/

|---projects/

Page 31: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

31

TELECOM ITALIA

|---...

|---bookTrading/

|---src/

|---...

|---classes/

|---cfg/

|---main.properties

|---types.xml

|---...

|---configuration/

|---bookTrading.xml

|---...

|---lib/

|---bookTrading.jar

|---...

|---deploy/

|---...

WADE ProjectC/

|---wade/

| |---bin/

|---startMain.bat

|---startBootDaemon.bat

|---cfg/

|---lib/

|---wade.jar

|---jade.jar

|---...

|---log/

|---projects/

|---...

|

WADE

libraries only Book Trading

project

configurations

project-home=C:\bookTrading

...

Book Trading

project libraries

Book Trading project workflows

...

<agentType description="Configuration Agent“ ...>

<properties>

<property name="configurationsPath"

value="${project-home}/cfg/configuration"/>

</properties>

</agentType>

<agentType description="Control Agent“ ...>

<properties>

...

<property name="class-loader-root"

value="${project-home}/deploy"/>

</properties>

</agentType>

...

---booktrading.properties

C:\wade>bin\startBootdaemon

C:\wade>bin\startMain booktrading

Page 32: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

32

TELECOM ITALIA

Golden Modem

Connect modem to

port 1-1-1-25.

Is the modem OK?

Y N

Workflow driven interactivity

Start

interaction step

Request to cennect

Golden-Modem

Aligned?

NO

YES

Reset port

The workflow metaphor is particularly suited to specify the steps of a The workflow metaphor is particularly suited to specify the steps of a The workflow metaphor is particularly suited to specify the steps of a The workflow metaphor is particularly suited to specify the steps of a

procedure and to guide a user in its executionprocedure and to guide a user in its executionprocedure and to guide a user in its executionprocedure and to guide a user in its execution

Page 33: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

33

TELECOM ITALIA

Golden Modem

Connect modem to

port 1-1-1-25.

Is the modem OK??

Y N

Workflow driven interactivity

End interaction

step

Request to cennect

Golden-Modem

Aligned?

NO

YES

Reset port

The workflow metaphor is particularly suited to specify the steps of a The workflow metaphor is particularly suited to specify the steps of a The workflow metaphor is particularly suited to specify the steps of a The workflow metaphor is particularly suited to specify the steps of a

procedure and to guide a user in its executionprocedure and to guide a user in its executionprocedure and to guide a user in its executionprocedure and to guide a user in its execution

The modem

does not align!

N

Page 34: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

34

TELECOM ITALIA

Interactions

Whether

Wheather forecast – September 24 2012:

•Rome: sunny

•Milan: foggy

•Turin: rainy

OK

Preferences

Favourite color

Red

Yellow

Blue

Hobbies

Sport

Cinema

Travels

Reading

Music

Next Back Exit

User: Giovanni Caire

Age: 42 (it's an old slide)

User information

Name:

Surname:

Age:

OK Cancel

Phone:

Address:

e-mail:

• Title

• Panel containing information to present and/or

request

• 1-n actions that close the interaction step and

make the workflow go ahead

Page 35: WADE - Unicalidc2012.deis.unical.it/slides/Wade1.pdf · WADE provides a readyWADE provides a ready----made made FrontEndFrontEndfor for ZKZZKKZK- ---OS technology OS technology Android

35

TELECOM ITALIA

Interaction Framework

Element

Action Component

InformationElement Panel

0..n

1

1..n

Visualizer

Interaction

- title

Components that define the layout of the

Interaction, i.e. how and where to place

information components

Components that actually define which

information are presented/requested to

the user

WADE provides a readyWADE provides a readyWADE provides a readyWADE provides a ready----made made made made

FrontEndFrontEndFrontEndFrontEnd for for for for

� ZKZKZKZK----OS technology OS technology OS technology OS technology

� Android Android Android Android

� GWT (under development)GWT (under development)GWT (under development)GWT (under development)

� RESTRESTRESTREST

Interactive WorkflowBehaviour

Interactivity Interactivity Interactivity Interactivity

FrontEndFrontEndFrontEndFrontEnd

can execute