org.yawlfoundation.yawl.elements
Class YTask

java.lang.Object
  extended by org.yawlfoundation.yawl.elements.YNetElement
      extended by org.yawlfoundation.yawl.elements.YExternalNetElement
          extended by org.yawlfoundation.yawl.elements.YTask
All Implemented Interfaces:
Cloneable, Comparable, YVerifiable
Direct Known Subclasses:
YAtomicTask, YCompositeTask

public abstract class YTask
extends YExternalNetElement

A superclass of any type of task in the YAWL language.

Author:
Lachlan Aldred, Michael Adams (v2.0 and later)

Field Summary
static int _AND
           
protected  Map<String,String> _dataMappingsForTaskEnablement
           
protected  Map<String,String> _dataMappingsForTaskStarting
           
protected  YDecomposition _decompositionPrototype
           
protected  YIdentifier _i
           
protected  YInternalCondition _mi_active
           
protected  YInternalCondition _mi_complete
           
protected  YInternalCondition _mi_entered
           
protected  YInternalCondition _mi_executing
           
protected  YMultiInstanceAttributes _multiInstAttr
           
static int _OR
           
static int _XOR
           
 
Fields inherited from class org.yawlfoundation.yawl.elements.YExternalNetElement
_documentation, _name, _net
 
Constructor Summary
YTask(String id, int joinType, int splitType, YNet container)
          Constructor
 
Method Summary
 void addRemovesTokensFrom(List<YExternalNetElement> removeSet)
           
 void cancel(YPersistenceManager pmgr)
           
protected  YVerificationMessage checkExternalMapping(String query)
           
protected  List<YVerificationMessage> checkXQuery(String xQuery, String param)
           
 Object clone()
           
protected  YIdentifier createFiredIdentifier(YPersistenceManager pmgr)
           
 YLogDataItemList get_inputLogDataItems()
           
 YLogDataItemList get_outputLogDataItems()
           
 List<YInternalCondition> getAllInternalConditions()
           
 String getConfiguration()
           
 org.jdom.Element getConfigurationElement()
           
 URL getCustomFormURL()
           
 org.jdom.Element getData(YIdentifier childInstanceID)
           
 String getDataBindingForEnablementParam(String paramName)
          Returns the query to a decomposition enablement parameter.
 String getDataBindingForInputParam(String paramName)
          Returns the query to a decomposition input parameter.
 String getDataBindingForOutputParam(String paramName)
          Returns the query to a decomposition output parameter.
 YDecomposition getDecompositionPrototype()
           
 String getDefaultConfiguration()
           
 org.jdom.Element getDefaultConfigurationElement()
           
 String getInformation()
           
 int getJoinType()
           
 YInternalCondition getMIActive()
           
 YInternalCondition getMIComplete()
           
 YInternalCondition getMIEntered()
           
 YInternalCondition getMIExecuting()
           
 String getMIOutputAssignmentVar(String query)
           
 YMultiInstanceAttributes getMultiInstanceAttributes()
           
protected  YNetRunnerRepository getNetRunnerRepository()
           
 Collection<String> getParamNamesForTaskCompletion()
           
protected  Set<String> getParamNamesForTaskEnablement()
           
protected  Set<String> getParamNamesForTaskStarting()
           
 String getPredicate(YExternalNetElement netElement)
           
 String getPreSplittingMIQuery()
           
 Set<YExternalNetElement> getRemoveSet()
           
 E2WFOJNet getResetNet()
           
 org.jdom.Element getResourcingSpecs()
           
 String getResourcingXML()
           
 String getSpecVersion()
          Gets the version of the specification.
 int getSplitType()
           
 Map getTimeParameters()
           
 YTimerVariable getTimerVariable()
           
protected  YWorkItemRepository getWorkItemRepository()
           
 boolean isMultiInstance()
           
protected  boolean isPopulatedEmptyTypeFlag(String expression)
           
protected  org.jdom.Element performDataExtraction(String expression, YParameter inputParam)
           
protected  org.jdom.Element performExternalDataExtraction(String expression, YParameter inputParam)
           
 void prepareDataDocsForTaskOutput()
           
 void prepareDataForInstanceStarting(YIdentifier childInstanceID)
           
protected  org.jdom.Element produceDataRootElement()
           
 void removeFromRemoveSet(YExternalNetElement e)
           
 void rollbackFired(YIdentifier childID, YPersistenceManager pmgr)
           
 void set_inputLogDataItems(YLogDataItemList _inputLogDataItems)
           
 void set_outputLogDataItems(YLogDataItemList _outputLogDataItems)
           
 void setConfiguration(String config)
           
 void setConfigurationElement(org.jdom.Element configElement)
           
 void setCustomFormURI(URL formURL)
           
 void setDataBindingForEnablementParam(String query, String paramName)
          Connects the query to a decomposition enablement parameter.
 void setDataBindingForInputParam(String query, String paramName)
          Connects the query to a decomposition parameter.
 void setDataBindingForOutputExpression(String query, String netVarName)
          Binds an output expression of a decomposition to a net variable.
 void setDataMappingsForTaskCompletion(Map<String,String> map)
          The input must be map of [key="expression", value="variableName"]
 void setDataMappingsForTaskStarting(Map<String,String> map)
          The input must be map of [key="variableName", value="expression"]
 void setDecompositionPrototype(YDecomposition decomposition)
           
 void setDefaultConfiguration(String defaultConfig)
           
 void setDefaultConfigurationElement(org.jdom.Element defaultConfigElement)
           
 void setI(YIdentifier i)
           
 void setJoinType(int joinType)
           
 void setMultiInstanceInputDataMappings(String remoteVariableName, String inputProcessingExpression)
           
 void setMultiInstanceOutputDataMappings(String remoteOutputQuery, String aggregationQuery)
           
 void setResetNet(E2WFOJNet net)
           
 void setResourcingSpecs(org.jdom.Element resSpec)
           
 void setResourcingXML(String xml)
           
 void setSplitType(int splitType)
           
 void setTimerParameters(String netParamName)
          TIMER SETTINGS
 void setTimerParameters(YWorkItemTimer.Trigger trigger, Date expiryTime)
           
 void setTimerParameters(YWorkItemTimer.Trigger trigger, Duration duration)
           
 void setTimerParameters(YWorkItemTimer.Trigger trigger, long ticks, YTimer.TimeUnit timeUnit)
           
 void setUpMultipleInstanceAttributes(String minInstanceQuery, String maxInstanceQuery, String thresholdQuery, String creationMode)
           
protected abstract  void startOne(YPersistenceManager pmgr, YIdentifier id)
           
 YIdentifier t_add(YPersistenceManager pmgr, YIdentifier siblingWithPermission, org.jdom.Element newInstanceData)
           
 boolean t_addEnabled(YIdentifier identifier)
           
 boolean t_complete(YPersistenceManager pmgr, YIdentifier childID, org.jdom.Document decompositionOutputData)
           
 boolean t_enabled(YIdentifier id)
           
 List<YIdentifier> t_fire(YPersistenceManager pmgr)
           
 boolean t_isBusy()
           
 boolean t_isExitEnabled()
           
 void t_start(YPersistenceManager pmgr, YIdentifier child)
           
 String timerParamsToXML()
           
 String toXML()
           
 List<YVerificationMessage> verify()
          Internally verify the object against YAWL language semantics and report any errors and/or warnings.
 
Methods inherited from class org.yawlfoundation.yawl.elements.YExternalNetElement
addPostset, addPreset, addToCancelledBySet, addToYawlMappings, addToYawlMappings, getCancelledBySet, getDocumentation, getDocumentationPreParsed, getName, getNet, getPostsetElement, getPostsetElements, getPostsetFlow, getPostsetFlows, getPresetElement, getPresetElements, getPresetFlow, getPresetFlows, getProperID, getYawlMappings, removeFromCancelledBySet, removePostsetFlow, removePresetFlow, setDocumentation, setName, verifyPostsetFlows, verifyPresetFlows
 
Methods inherited from class org.yawlfoundation.yawl.elements.YNetElement
compareTo, getID, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_AND

public static final int _AND
See Also:
Constant Field Values

_OR

public static final int _OR
See Also:
Constant Field Values

_XOR

public static final int _XOR
See Also:
Constant Field Values

_i

protected YIdentifier _i

_mi_active

protected YInternalCondition _mi_active

_mi_entered

protected YInternalCondition _mi_entered

_mi_complete

protected YInternalCondition _mi_complete

_mi_executing

protected YInternalCondition _mi_executing

_multiInstAttr

protected YMultiInstanceAttributes _multiInstAttr

_dataMappingsForTaskStarting

protected final Map<String,String> _dataMappingsForTaskStarting

_dataMappingsForTaskEnablement

protected final Map<String,String> _dataMappingsForTaskEnablement

_decompositionPrototype

protected YDecomposition _decompositionPrototype
Constructor Detail

YTask

public YTask(String id,
             int joinType,
             int splitType,
             YNet container)
Constructor

Parameters:
id -
splitType -
joinType -
container -
Method Detail

setI

public void setI(YIdentifier i)

getResetNet

public E2WFOJNet getResetNet()

setResetNet

public void setResetNet(E2WFOJNet net)

getSplitType

public int getSplitType()

getJoinType

public int getJoinType()

setSplitType

public void setSplitType(int splitType)

setJoinType

public void setJoinType(int joinType)

isMultiInstance

public boolean isMultiInstance()

getPredicate

public String getPredicate(YExternalNetElement netElement)

getMultiInstanceAttributes

public YMultiInstanceAttributes getMultiInstanceAttributes()

setUpMultipleInstanceAttributes

public void setUpMultipleInstanceAttributes(String minInstanceQuery,
                                            String maxInstanceQuery,
                                            String thresholdQuery,
                                            String creationMode)

setMultiInstanceInputDataMappings

public void setMultiInstanceInputDataMappings(String remoteVariableName,
                                              String inputProcessingExpression)

setMultiInstanceOutputDataMappings

public void setMultiInstanceOutputDataMappings(String remoteOutputQuery,
                                               String aggregationQuery)

getParamNamesForTaskCompletion

public Collection<String> getParamNamesForTaskCompletion()

checkXQuery

protected List<YVerificationMessage> checkXQuery(String xQuery,
                                                 String param)

checkExternalMapping

protected YVerificationMessage checkExternalMapping(String query)

getParamNamesForTaskEnablement

protected Set<String> getParamNamesForTaskEnablement()

getParamNamesForTaskStarting

protected Set<String> getParamNamesForTaskStarting()

getRemoveSet

public Set<YExternalNetElement> getRemoveSet()

addRemovesTokensFrom

public void addRemovesTokensFrom(List<YExternalNetElement> removeSet)

removeFromRemoveSet

public void removeFromRemoveSet(YExternalNetElement e)

t_fire

public List<YIdentifier> t_fire(YPersistenceManager pmgr)
                         throws YStateException,
                                YDataStateException,
                                YQueryException,
                                YPersistenceException
Throws:
YStateException
YDataStateException
YQueryException
YPersistenceException

prepareDataDocsForTaskOutput

public void prepareDataDocsForTaskOutput()

t_add

public YIdentifier t_add(YPersistenceManager pmgr,
                         YIdentifier siblingWithPermission,
                         org.jdom.Element newInstanceData)
                  throws YDataStateException,
                         YStateException,
                         YQueryException,
                         YPersistenceException
Throws:
YDataStateException
YStateException
YQueryException
YPersistenceException

t_addEnabled

public boolean t_addEnabled(YIdentifier identifier)

getPreSplittingMIQuery

public String getPreSplittingMIQuery()

t_isExitEnabled

public boolean t_isExitEnabled()

t_complete

public boolean t_complete(YPersistenceManager pmgr,
                          YIdentifier childID,
                          org.jdom.Document decompositionOutputData)
                   throws YDataStateException,
                          YStateException,
                          YQueryException,
                          YPersistenceException
Throws:
YDataStateException
YStateException
YQueryException
YPersistenceException

getMIOutputAssignmentVar

public String getMIOutputAssignmentVar(String query)

t_start

public void t_start(YPersistenceManager pmgr,
                    YIdentifier child)
             throws YDataStateException,
                    YPersistenceException,
                    YQueryException,
                    YStateException
Throws:
YDataStateException
YPersistenceException
YQueryException
YStateException

getNetRunnerRepository

protected YNetRunnerRepository getNetRunnerRepository()

getWorkItemRepository

protected YWorkItemRepository getWorkItemRepository()

t_enabled

public boolean t_enabled(YIdentifier id)

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class YExternalNetElement
Throws:
CloneNotSupportedException

startOne

protected abstract void startOne(YPersistenceManager pmgr,
                                 YIdentifier id)
                          throws YDataStateException,
                                 YPersistenceException,
                                 YQueryException,
                                 YStateException
Throws:
YDataStateException
YPersistenceException
YQueryException
YStateException

createFiredIdentifier

protected YIdentifier createFiredIdentifier(YPersistenceManager pmgr)
                                     throws YPersistenceException
Throws:
YPersistenceException

prepareDataForInstanceStarting

public void prepareDataForInstanceStarting(YIdentifier childInstanceID)
                                    throws YDataStateException,
                                           YStateException,
                                           YQueryException
Throws:
YDataStateException
YStateException
YQueryException

performDataExtraction

protected org.jdom.Element performDataExtraction(String expression,
                                                 YParameter inputParam)
                                          throws YDataStateException,
                                                 YQueryException
Throws:
YDataStateException
YQueryException

isPopulatedEmptyTypeFlag

protected boolean isPopulatedEmptyTypeFlag(String expression)

performExternalDataExtraction

protected org.jdom.Element performExternalDataExtraction(String expression,
                                                         YParameter inputParam)
                                                  throws YStateException,
                                                         YDataStateException
Throws:
YStateException
YDataStateException

produceDataRootElement

protected org.jdom.Element produceDataRootElement()

getData

public org.jdom.Element getData(YIdentifier childInstanceID)

t_isBusy

public boolean t_isBusy()

cancel

public void cancel(YPersistenceManager pmgr)
            throws YPersistenceException
Throws:
YPersistenceException

rollbackFired

public void rollbackFired(YIdentifier childID,
                          YPersistenceManager pmgr)
                   throws YPersistenceException
Throws:
YPersistenceException

getMIActive

public YInternalCondition getMIActive()

getMIEntered

public YInternalCondition getMIEntered()

getMIComplete

public YInternalCondition getMIComplete()

getMIExecuting

public YInternalCondition getMIExecuting()

getAllInternalConditions

public List<YInternalCondition> getAllInternalConditions()

setDataMappingsForTaskStarting

public void setDataMappingsForTaskStarting(Map<String,String> map)
The input must be map of [key="variableName", value="expression"]

Parameters:
map -

setDataMappingsForTaskCompletion

public void setDataMappingsForTaskCompletion(Map<String,String> map)
The input must be map of [key="expression", value="variableName"]

Parameters:
map -

toXML

public String toXML()
Overrides:
toXML in class YExternalNetElement

getDecompositionPrototype

public YDecomposition getDecompositionPrototype()

setDecompositionPrototype

public void setDecompositionPrototype(YDecomposition decomposition)

setDataBindingForEnablementParam

public void setDataBindingForEnablementParam(String query,
                                             String paramName)
Connects the query to a decomposition enablement parameter.

Parameters:
query - a query applied to the net enablement variable in the net containing this task.
paramName - the enablement decomposition parameter to which to apply the result.

getDataBindingForEnablementParam

public String getDataBindingForEnablementParam(String paramName)
Returns the query to a decomposition enablement parameter.

Parameters:
paramName - the decomposition enablement variable.
Returns:
the data binding query for that parameter.

setDataBindingForInputParam

public void setDataBindingForInputParam(String query,
                                        String paramName)
Connects the query to a decomposition parameter.

Parameters:
query - a query applied to the net variables in the net containing this task.
paramName - the decomposition parameter to which to apply the result.

getDataBindingForInputParam

public String getDataBindingForInputParam(String paramName)
Returns the query to a decomposition input parameter.

Parameters:
paramName - the decomposition input parameter.
Returns:
the data binding query for that parameter.

setDataBindingForOutputExpression

public void setDataBindingForOutputExpression(String query,
                                              String netVarName)
Binds an output expression of a decomposition to a net variable.

Parameters:
query - the ouptut expression belonging to the tasks decomposition
netVarName - the net scope variable to which to apply the result.

getDataBindingForOutputParam

public String getDataBindingForOutputParam(String paramName)
Returns the query to a decomposition output parameter.

Parameters:
paramName - the decomposition output parameter.
Returns:
the data binding query for that parameter.

getInformation

public String getInformation()

getSpecVersion

public String getSpecVersion()
Gets the version of the specification.

Returns:
the specification version.

get_inputLogDataItems

public YLogDataItemList get_inputLogDataItems()

set_inputLogDataItems

public void set_inputLogDataItems(YLogDataItemList _inputLogDataItems)

get_outputLogDataItems

public YLogDataItemList get_outputLogDataItems()

set_outputLogDataItems

public void set_outputLogDataItems(YLogDataItemList _outputLogDataItems)

verify

public List<YVerificationMessage> verify()
Description copied from interface: YVerifiable
Internally verify the object against YAWL language semantics and report any errors and/or warnings.

Specified by:
verify in interface YVerifiable
Overrides:
verify in class YExternalNetElement
Returns:
a List of YVerificationMessage objects
See Also:
YVerificationMessage

getResourcingXML

public String getResourcingXML()

setResourcingXML

public void setResourcingXML(String xml)

getResourcingSpecs

public org.jdom.Element getResourcingSpecs()

setResourcingSpecs

public void setResourcingSpecs(org.jdom.Element resSpec)

setCustomFormURI

public void setCustomFormURI(URL formURL)

getCustomFormURL

public URL getCustomFormURL()

setTimerParameters

public void setTimerParameters(String netParamName)
TIMER SETTINGS


setTimerParameters

public void setTimerParameters(YWorkItemTimer.Trigger trigger,
                               Date expiryTime)

setTimerParameters

public void setTimerParameters(YWorkItemTimer.Trigger trigger,
                               long ticks,
                               YTimer.TimeUnit timeUnit)

setTimerParameters

public void setTimerParameters(YWorkItemTimer.Trigger trigger,
                               Duration duration)

getTimerVariable

public YTimerVariable getTimerVariable()

getTimeParameters

public Map getTimeParameters()

timerParamsToXML

public String timerParamsToXML()

getConfiguration

public String getConfiguration()

setConfiguration

public void setConfiguration(String config)

getDefaultConfiguration

public String getDefaultConfiguration()

setDefaultConfiguration

public void setDefaultConfiguration(String defaultConfig)

getConfigurationElement

public org.jdom.Element getConfigurationElement()

setConfigurationElement

public void setConfigurationElement(org.jdom.Element configElement)

getDefaultConfigurationElement

public org.jdom.Element getDefaultConfigurationElement()

setDefaultConfigurationElement

public void setDefaultConfigurationElement(org.jdom.Element defaultConfigElement)


Copyright © 2004-2012 The YAWL Foundation.