Workflow

Workflow class is the main container of Steps and Modules

class DIRAC.Core.Workflow.Workflow.Workflow(obj=None, name=None)

Bases: DIRAC.Core.Workflow.Parameter.AttributeCollection

__init__(obj=None, name=None)

Be aware that 1-st param is an obj not a name!!!! obj can me a string with XML representation or with filename also obj can be a Workflow or ParameterCollections

addModule(module)
addParameter(opt, prefix='', postfix='')
addParameterLinked(opt, prefix='', postfix='')
addStep(step)
addTool(name, tool)

Add an object that will be available in all the modules to perform some operations. For example, a state reporting facility.

clear() → None. Remove all items from D.
compare(s)
compareParameters(s)
copy() → a shallow copy of D
createCode(combine_steps=False)
createStepInstance(type, name)

Creates step instance of type ‘type’ with the name ‘name’

execute()
findParameter(name_or_ind)
findParameterIndex(ind)
fromWorkflow(obj)
fromkeys(S[, v]) → New dict with keys from S and values equal to v.

v defaults to None.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
getBody()
getDescrShort()
getDescription()
getName()
getOrigin()
getParent()
getRequired()
getType()
getVersion()
has_key(k) → True if D has a key k, else False
items() → list of D's (key, value) pairs, as 2-tuples
iteritems() → an iterator over the (key, value) items of D
iterkeys() → an iterator over the keys of D
itervalues() → an iterator over the values of D
keys() → list of D's keys
linkUp(opt, prefix='', postfix='', objname='self')
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

removeAllParameters()
removeParameter(name_or_ind)
removeStepInstance(name)
resolveGlobalVars()

This method will create global parameter list and then will resolve all instances of @{VARNAME} Be aware that parameters of that type are GLOBAL!!! are string and can not be dynamically change The scope: the resolution of that parameters apply from lower to upper object, for example if parameter use in module, then it checks module, then step, then workflow

Comment: If varible linked it should not be used in a global list

setBody(body)
setDescrShort(descr_short)
setDescription(description)
setName(name)
setOrigin(origin)
setParent(parent)
setRequired(required)
setType(att_type)
setValue(name, value, type_=None)
setVersion(ver)
setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
toXML()

Creates an XML representation of itself

toXMLFile(outFile)
toXMLString()
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

updateParents()
values() → list of D's values
viewitems() → a set-like object providing a view on D's items
viewkeys() → a set-like object providing a view on D's keys
viewvalues() → an object providing a view on D's values
DIRAC.Core.Workflow.Workflow.fromXMLFile(xml_file, obj=None)
DIRAC.Core.Workflow.Workflow.fromXMLString(xml_string, obj=None)