JVO technical overview- Workflow Masahiro Tanaka(NAOJ)

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 1

Purpose• Federate Services– Catalog Search

SkyNodeQueryJVO– Analysis Services• Automatic execution• Flexible constructionof workflow by users.

QSO Catalog

workflow
control

SIA ServiceSubaru
image

HyperZ
WebServices

SourceCatalog

SExtractor
WebServices

Analysis Services

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 2

Design of Workflow• Described in XML. (and more human-friendlylanguage?)• Available services can be found from VOResource.
• Usage descriptions of a service are also found fromVOResource.
• Service Provider can register their services easily.

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 3

Workflow Schema•

Design of BPEL4WS is reflected in JVO workflow.
Diagram of Workflow Description Language
Parfor
10..1
Variables<<rootnode>>
Process
1

1..*1<<abstract>>
SequenceActivity

Sequence

While<<abstract>>
Activity

Variable<<abstract>>
Control

11<<abstract>>
ActivityContainer<<abstract>>
BasicActivity

Flow<<abstract>>
ConditionControl

1

ScriptCommandinvoke10..1Input

2006-2-20

For

1

1..*

10..*

<<abstract>>
LoopControl

1

10..1

1..*

ThenElse

Case

ifSwitch
10..1
Otherwise

0..1
OutputAstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 4

Variable definition• variables• variable• value<variables><variable name="imageSize" type="double"><value>0.02</value></variable><variable name="imageTable" type="String"><value>ivo://jvo/subaru/spcam:spcam_mos_view</value></variable><variable name="votableForImage" type="ArrayOfVOTABLE"/><variable name="listOfURL" type="ArrayOfString"/>• set<variable name="catalog" type="VOTABLE"/></variables><set name=“imageSize” literal=“0.1”>

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 5

Variable types (TBD)• Simple types– int• Array types– ArrayOf*• (* is a simple type)– double– string• Collections– VOTable– Map– ADQL

– List– DataHandler

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 6

invoke•invokes Web services(SkyNode, SIAP, Analysis services etc.)•Specify identifier, then resolve services from VOResourceExample:<invoke identifier="ivo://jvo/tools/sextractor"
url="http://jvoc.dc.nao.ac.jp:8080/services/SExtractor?wsdl"
operation="performForURL"><input><varRef>listOfURL[_count]</varRef></input><output><varRef>catalog</varRef></output></invoke>2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 7

command•executes internal functions•

2 types:
1. classMethod
2. builtin

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 8

command(1): class method type
type=“classMethod”– invoke Java class method

Example:<command xsi:type="classMethod"class_name="QSOStudy“
method="prepare"><input><varRef>result_file1</varRef></input><output><varRef>listOfURL</varRef></output></command>
2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 9

command(2): built-in type
type=“builtin”• pre-registered, frequently-used operation– executeQuery– copyToVOStore– …
Example:<command xsi:type="builtin" name="executeQuery"><input><varRef>jvoql</varRef></input><output><varRef>votableForImage</varRef></output></command>
2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 10

SequenceActivity• holds List of activities•– sequence :sequential execution– flow :parallel execution

example:<sequence><command type=“builtin” name=“…”><command type=“classMethod” class_name=“… ><for …>…
</sequence>

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 11

Loop & Condition• LoopControl:– for– parfor– (while)
Nested loop is not currently supported.

• ConditonalControl– (if)– (switch)
2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 12

Script support• Groovy script is supported.
Example:<script><input><literal>pattern = “[^abc]”;
text = “d”;
println text==~pattern</literal></input></script>
2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 13

Current implementation
Workflow(XML)XSLTconversion

Groovy Script

ExecuteWorkflow
2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 14

Web Service Interface (1)• Conventional use of Web Services:– generate Java Stub code from WSDL.

• But it needs re-compilation.
– JVO workflow must be restarted when newservices are added.

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 15

Web Service Interface (2)• DII (Dynamic Invocation Interface) of JAXRPC is used for workflow executer.
– Benefit• Register new Web Services dynamically.
• Avoid re-compilation of JVO System.

– Restriction• Only primitive and pre-registered classes can be used forarguments.

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 16

Workflow Builder for users• Simple workflow editor is implemented.
• More user-friendly workflow builder will bedeveloped.
• Graphical workflow builder– use of JFLOW by Andre Schaaff et al.
@CDS?

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 17

Development timeline• Jun 2005 – design started• Dec 2005 – implementation started• Jan 2006 – first prototype appeared• current – under development

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 18

Summary• Workflow Description Language is defined.
• Workflow is converted to Groovy script.
• DII is required for dynamical registration ofWeb Services.

2006-2-20

AstroGrid/JVO meeting

Masahiro Tanaka (NAOJ) 19