agent workflows with wade

72
UTC The workflow metaphor Agent-based workflows WADE Overview Architecture The Factorial case study General Information Implementation Preparing the Infrastructure Creating the Agent Creating the Workflow WADE Delegation Model Running sub-workflows Agent Workflows with WADE Márcio Fuckner 1 1 Université de Technologie de Compiègne, France Multiagent System Development

Upload: marcio-fuckner

Post on 10-May-2015

1.455 views

Category:

Education


0 download

DESCRIPTION

Mini-tutorial presenting: The workflow metaphor Agent-based workflows WADE Framework Overview WADE Architecture Case study

TRANSCRIPT

Page 1: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Agent Workflows with WADE

Márcio Fuckner1

1Université de Technologie de Compiègne, France

Multiagent System Development

Page 2: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Outline

1 The workflow metaphor

2 Agent-based workflows

3 WADEOverviewArchitecture

4 The Factorial case studyPreparing the InfrastructureCreating the AgentCreating the WorkflowWADE Delegation ModelRunning sub-workflows

Page 3: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Definition

WorkflowA workflow is the automation of a businessprocess, which artifacts, information and/or tasksare passed from one actor to another accordingto a set of procedural rules.[Workflow Management Coalition, 2013]

FormalismsMany formalisms exist to represent a workflow.Some examples are flow charts, UML activitydiagrams and finite state machine diagrams.

Page 4: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Definition

WorkflowA workflow is the automation of a businessprocess, which artifacts, information and/or tasksare passed from one actor to another accordingto a set of procedural rules.[Workflow Management Coalition, 2013]

FormalismsMany formalisms exist to represent a workflow.Some examples are flow charts, UML activitydiagrams and finite state machine diagrams.

Page 5: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

A workflow example

Page 6: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Functional Areas

Figure: Source: [Caire, 2008]

Page 7: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Examples of Workflow DescriptionLanguages

BPELBusiness Process Execution Language.

• Keywords: SOA, WS oriented• More information: OASIS

(http://www.oasis-open.org)

XPDLXML Process Definition Language.

• Keywords: Visual modelling notations,XML based

• More information: Workflow ManagementCoalition (http://www.wfmc.org)

Page 8: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Pros and Cons

Pros

• Extremely intuitive. Can be validated bydomain experts with no programming skills

• Self-documented• Execution steps are made explicit• Workflows are interpreted at runtime• Several infrastructure facilities

Cons

• Not suitable to deal with low-leveloperations

• Supporting tools not comparable with thoseavailable for normal code development

• Less efficient execution

Page 9: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Pros and Cons

Pros

• Extremely intuitive. Can be validated bydomain experts with no programming skills

• Self-documented• Execution steps are made explicit• Workflows are interpreted at runtime• Several infrastructure facilities

Cons

• Not suitable to deal with low-leveloperations

• Supporting tools not comparable with thoseavailable for normal code development

• Less efficient execution

Page 10: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Pros and Cons

Pros

• Extremely intuitive. Can be validated bydomain experts with no programming skills

• Self-documented• Execution steps are made explicit• Workflows are interpreted at runtime• Several infrastructure facilities

Cons

• Not suitable to deal with low-leveloperations

• Supporting tools not comparable with thoseavailable for normal code development

• Less efficient execution

Page 11: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Bringing the workflow approach to theMultiagent world

Agent-based workflowsThe basic idea is to use theexpressiveness of the workflowmetaphor to improve the agentcommunication process.

Page 12: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

What is WADE?

• is a software platforma based on JADE• A WADE application is also a JADE application• All JADE features are available in WADE too

• Allows the execution of tasks using the workflowmetaphor

• Adopted the XPDL meta-model to facilitateimport/export from/to a standard workflowrepresentation format

aFor more information: http://jade.tilab.com/wade/

Page 13: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Main components

Figure: Source: [Telecom Italia, 2011b]

WADE and WOLFIn principle WADE supports“notepad-programming”, but it comeswith a graphical developmentenvironment called WOLF[Telecom Italia, 2011b].

Page 14: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Architecture

Figure: Source: [Telecom Italia, 2011b]

Page 15: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

A classroom case study using WADE

• Now, it’s time to develop asimple but complete applicationusing WADE ...

• ... from scratch !

Page 16: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Formal Definition

• In mathematics, the factorial ofa non-negative integer n,denoted by n!, is the product ofall positive integers less than orequal n

• For example: 5! = 5 x 4 x 3 x 2x 1 = 120

• According to the rule, the valueof 0! is 1

Page 17: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Implementing the application using theworkflow metaphor

NoteWe know ... The factorial problem could easily be implemented in one line, as theexample above in LISP:

(defun fa (n)(cond ((eq n 1) n) ((> n 1) (* (fa (- n 1) ) n ) ) )

By the other hand, this problem allows to explore the workflow metaphor, keepingus focused on the approach and not on out-of-scope issues.

Page 18: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Implementing the application using theworkflow metaphor

• We will start by implementing asimple solution using only oneworkflow agent

• Next, we will improve theapplication, enabling theparallel execution ofsub-workflows

Page 19: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

A workflow with only one actor

Page 20: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Creating the Project

• (1) Creating a JavaProject

• Adding WADE Nature

• Configuring WADE

Page 21: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Creating the Project

• Creating a Java Project

• (2) Adding WADENature

• Configuring WADE

Page 22: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Creating the Project

• Creating a Java Project

• Adding WADE Nature

• (3) Configuring WADE

Page 23: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE distribution structure

Figure: Source: [Caire, 2008]

Page 24: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Application Structure

Page 25: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(4) Defining the Agent

• The Factorial Agent willnot inherit from thejade.core.Agent classdirectly

• We will use theWorkflowEngineAgent a

• All workflow agents areautomatically registeredin the DF

aSee FactorialAgent.java

Page 26: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(5) Agent Types

• WADE agentsautomatically registerswith the DF providing adefault description.

• Such descriptioncontains the agent typeas indicated in thecfg/types.xml file whererelevant agent types aredeclared.

Figure: See cfg/types.xml

Page 27: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(6) Allowing the Agent to executeWorkflows

DispatchCapabilities ObjectBy embedding a DispatchingCapabilitiesinstance, an agent acquires the ability oflaunching workflows, setting andretrieving, workflow relevant data andlistening to events generated by theexecution of workflows[Telecom Italia, 2011a].

Figure: See FactorialAgent.java

Page 28: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(7) Preparing the configuration for thefirst execution

Configuration fileBefore lauching our applicationwe still need to declare whichagents we want to activate in it.This can be done by means ofan "Application ConfigurationFile".

Figure: See cfg/configuration/Factorial.xml

Page 29: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Running the application for the firsttime

Page 30: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Basic workflow terminology

• Workflow/Process

• Activity

• Transition

Page 31: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Basic workflow terminology

• Workflow/Process

• Activity

• Transition

Page 32: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Basic workflow terminology

• Workflow/Process

• Activity

• Transition

Page 33: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 34: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 35: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 36: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 37: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 38: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 39: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

The WADE meta-model

Figure: Source: [Telecom Italia, 2011b]

Page 40: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 41: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 42: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 43: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 44: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 45: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 46: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 47: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 48: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 49: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 50: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

In practice

Figure: Source: [Telecom Italia, 2011b]

Page 51: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(8) Creating a Workflow

• Workflows inWADE are Javaclasses that extendtheWorkflowBehaviourclass

• Indirectly, this classextends our knownJADE Behaviour

• WOLF provides aview to edit aworkflow in abidirectionalfashion.

Figure: See FactorialWorkflow.java

Page 52: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(9) (10) Executing Workflows

Figure: See calculate method defined in FactorialAgent.java

Page 53: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Running the application

Page 54: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 55: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 56: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 57: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 58: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 59: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 60: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

WADE Delegation Model

Figure: Source: [Telecom Italia, 2011b]

Page 61: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

A workflow with two actors

Executing sub-workflowsNow, we will change the codeto allow agents delegate theexecution of sub-workflows toother agents

Page 62: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Application Structure

Page 63: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Changing Project Settings

• (11) Creating the multiply agent (SeeMultiplyAgent.java)

• Adding multiplier to cfg/types.xml

• Creating the multiplication sub-workflow (SeeMultiplyWorkflow.java)

• Changing the project configuration See cfg/configuration/Factorial.xml)

Page 64: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Changing Project Settings

• Creating the mutiply agent (See MultiplyAgent.java)

• (12) Adding multiplier to cfg/types.xml

• Creating the multiplication sub-workflow (SeeMultiplyWorkflow.java)

• Changing the project configuration See cfg/configuration/Factorial.xml)

Page 65: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Changing Project Settings

• Creating the mutiply agent (See MultiplyAgent.java)

• Adding multiplier to cfg/types.xml

• (13) Creating the multiplication sub-workflow (SeeMultiplyWorkflow.java)

• Changing the project configuration See cfg/configuration/Factorial.xml)

Page 66: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Changing Project Settings

• Creating the mutiply agent (See MultiplyAgent.java)

• Adding multiplier to cfg/types.xml

• Creating the multiplication sub-workflow (SeeMultiplyWorkflow.java)

• (14) Changing the project configuration (Seecfg/configuration/Factorial.xml)

Page 67: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(15) Changing the Factorial Agent

Executing sub-workflowsNow, we will change the codeto allow the factorial agentkeep on track of multiplyagents life-cycle a.

aSee subscribe method defined in FactorialAgent.java

Page 68: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

(16) Changing the Factorial Workflow

Changing the workflowNow, we will change theworkflow in order to executethe multiplication in parallel,joining the results at the endof all operations a.

aSee FactorialWorkflow.java

Page 69: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Running the application

Page 70: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Conclusion

Questions?

• A hands-on example on WADE• Much more examples and resources on

http://jade.tilab.com/wade/• See also the WADE tutorial at

http://jade.tilab.com/wade/doc/tutorial/WADE-Tutorial.pdf

Contact Information

• Marcio Fuckner• [email protected]

Page 71: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Caire, G. (2008).WADE: an open source platform for workflows and agents.The Seventh International Conference On AutonomousAgents and Multiagent Systems.

Telecom Italia (2011a).WADE Tutorial.Telecom Italia.Available athttp://jade.tilab.com/wade/doc/tutorial/WADE-Tutorial.pdf.

Telecom Italia (2011b).WADE User Guide.Telecom Italia.Available athttp://jade.tilab.com/wade/doc/WADE-User-Guide.pdf.

Workflow Management Coalition (2013).

Page 72: Agent Workflows with WADE

UTC

The workflowmetaphor

Agent-basedworkflows

WADEOverview

Architecture

The Factorialcase studyGeneral Information

Implementation

Preparing theInfrastructure

Creating the Agent

Creating theWorkflow

WADE DelegationModel

Runningsub-workflows

Workflow Management Coalition Terminology and Glossary.Workflow Management Coalition.Available at http://www.wfmc.org.