Package com.uc4.api.objects
Class JobPlan
java.lang.Object
com.uc4.api.objects.UC4Object
com.uc4.api.objects.JobPlan
- All Implemented Interfaces:
LifecycleSaveAware,WorkflowInterfaces.IUpdatable
This class represents a standard Workflow object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTask(JobPlanTask task) Adds a task to theJobPlan.voidCalled after an object is saved.Returns attributes of thisJobPlan.voidclear()Removes all tasks.voidcloseJobPlanTasks(TaskState when) Connects tasks with the START task if they have to predecessor.This method provides access to the deployment tab of a ProcessFlow.voidformat()Calculates the position of all tasks in thisJobPlan.Returns the END-task of thisJobPlan.getFirstTaskByName(String name) Returns the first task in the JobPlan monitor which has the specified object name.Returns the content of the "Process" tab.Returns the START-task of thisJobPlan.Returns a worfkflow task with the specified ID.header()Returns the header data of this object.booleanReturnstrueif this Object can be executed.protected voidloadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes info) booleanremoveTask(JobPlanTask task) Removes the specified task from theJobPlan.voidreplaceTask(JobPlanTask oldTask, JobPlanTask newTask) Replaces an existingJobPlanTask.rollback()This method provides access to the rollback tab of an executable object.runtime()Returns runtime information of this job.voidsetProcess(String script) Sets the content of the "Process" tab.protected voidsetTaskFactory(WorkFlowTaskFactory taskFactory) Sub classes may call this method in order to provide their own sub class ofJobPlanTaskwhich may contain additional features.protected voidstoreContent(com.uc4.util.XMLDocument doc, Element objectElement, ConnectionAttributes sessionInfo) syncs()Returns aSyncListobject which contains sync conditions of this object.Returns an iterator overJobPlanTask.inttaskSize()Returns the number of tasks in thisJobPlan.voidupdate()Update the object (i.e.voidvalidate()Validates the object.values()Methods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store
-
Constructor Details
-
JobPlan
public JobPlan()
-
-
Method Details
-
loadContent
-
values
- Returns:
- Variables of this object
-
setTaskFactory
Sub classes may call this method in order to provide their own sub class ofJobPlanTaskwhich may contain additional features.- Parameters:
taskFactory- Task Factory
-
rollback
This method provides access to the rollback tab of an executable object.- Returns:
- Rollback settings
-
taskIterator
Returns an iterator overJobPlanTask.- Returns:
- iterator over
JobPlanTask
-
taskSize
public int taskSize()Returns the number of tasks in thisJobPlan.- Returns:
- Number of tasks
-
getFirstTaskByName
Returns the first task in the JobPlan monitor which has the specified object name.- Parameters:
name- Name of the UC4 object- Returns:
- Task or
nullif not found
-
getTaskByUserDefinedID
Returns a worfkflow task with the specified ID.- Parameters:
id- ID of the task- Returns:
- Task or
nullif not found
-
addTask
Adds a task to theJobPlan.- Parameters:
task- JobPlan task
-
removeTask
Removes the specified task from theJobPlan.- Parameters:
task- JobPlan task which should be removed- Returns:
- True if the task was removed successfully
-
header
Returns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- header
-
syncs
Returns aSyncListobject which contains sync conditions of this object.- Returns:
- sync conditions
-
runtime
Returns runtime information of this job. This corresponds to the "Runtime" tab in the dialog client.- Returns:
- Runtime information
-
deployment
This method provides access to the deployment tab of a ProcessFlow.- Returns:
- Deployment settings
-
getProcess
Returns the content of the "Process" tab.- Returns:
- JCL
-
setProcess
Sets the content of the "Process" tab.- Parameters:
script- Script
-
attributes
Returns attributes of thisJobPlan.- Returns:
- JobPlan attributes
-
getEndTask
Returns the END-task of thisJobPlan. A JobPlan always has an END task- Returns:
- END task
-
getStartTask
Returns the START-task of thisJobPlan. A JobPlan always has an START task- Returns:
- START task
-
storeContent
protected void storeContent(com.uc4.util.XMLDocument doc, Element objectElement, ConnectionAttributes sessionInfo) -
format
public void format()Calculates the position of all tasks in thisJobPlan. -
validate
Description copied from class:UC4ObjectValidates the object. If the object is not valid anInvalidObjectExceptionis thrown.- Overrides:
validatein classUC4Object- Throws:
InvalidObjectException- If the object is not valid
-
replaceTask
Replaces an existingJobPlanTask.- Parameters:
oldTask- JobPlanTask which should be replacednewTask- JobPlanTask which replaces the old task
-
closeJobPlanTasks
Connects tasks with the START task if they have to predecessor. All tasks without successors are connected to the END task.- Parameters:
when- Status
-
clear
public void clear()Removes all tasks. -
isExecutable
public boolean isExecutable()Description copied from class:UC4ObjectReturnstrueif this Object can be executed.- Specified by:
isExecutablein classUC4Object- Returns:
- true if the Object can be executed, false if not.
-
update
public void update()Description copied from interface:WorkflowInterfaces.IUpdatableUpdate the object (i.e. recalculate internal properties, sort tasks, ...)- Specified by:
updatein interfaceWorkflowInterfaces.IUpdatable
-
afterSaveObject
public void afterSaveObject()Description copied from interface:LifecycleSaveAwareCalled after an object is saved.- Specified by:
afterSaveObjectin interfaceLifecycleSaveAware
-