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
public class JobPlan extends UC4Object implements WorkflowInterfaces.IUpdatable, LifecycleSaveAware
This class represents a standard Workflow object.
-
-
Constructor Summary
Constructors Constructor Description JobPlan()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTask(JobPlanTask task)
Adds a task to theJobPlan
.void
afterSaveObject()
Called after an object is saved.JobPlanAttributes
attributes()
Returns attributes of thisJobPlan
.void
clear()
Removes all tasks.void
closeJobPlanTasks(TaskState when)
Connects tasks with the START task if they have to predecessor.Deployment
deployment()
This method provides access to the deployment tab of a ProcessFlow.void
format()
Calculates the position of all tasks in thisJobPlan
.JobPlanTask
getEndTask()
Returns the END-task of thisJobPlan
.JobPlanTask
getFirstTaskByName(java.lang.String name)
Returns the first task in the JobPlan monitor which has the specified object name.java.lang.String
getProcess()
Returns the content of the "Process" tab.JobPlanTask
getStartTask()
Returns the START-task of thisJobPlan
.JobPlanTask
getTaskByUserDefinedID(java.lang.String id)
Returns a worfkflow task with the specified ID.XHeader
header()
Returns the header data of this object.boolean
isExecutable()
Returnstrue
if this Object can be executed.protected void
loadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes info)
boolean
removeTask(JobPlanTask task)
Removes the specified task from theJobPlan
.void
replaceTask(JobPlanTask oldTask, JobPlanTask newTask)
Replaces an existingJobPlanTask
.Rollback
rollback()
This method provides access to the rollback tab of an executable object.Runtime
runtime()
Returns runtime information of this job.void
setProcess(java.lang.String script)
Sets the content of the "Process" tab.protected void
setTaskFactory(WorkFlowTaskFactory taskFactory)
Sub classes may call this method in order to provide their own sub class ofJobPlanTask
which may contain additional features.protected void
storeContent(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes sessionInfo)
SyncList
syncs()
Returns aSyncList
object which contains sync conditions of this object.java.util.Iterator<JobPlanTask>
taskIterator()
Returns an iterator overJobPlanTask
.int
taskSize()
Returns the number of tasks in thisJobPlan
.void
update()
Update the object (i.e.void
validate()
Validates the object.ObjectValues
values()
-
Methods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store
-
-
-
-
Method Detail
-
loadContent
protected void loadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes info)
-
values
public ObjectValues values()
- Returns:
- Variables of this object
-
setTaskFactory
protected void setTaskFactory(WorkFlowTaskFactory taskFactory)
Sub classes may call this method in order to provide their own sub class ofJobPlanTask
which may contain additional features.- Parameters:
taskFactory
- Task Factory
-
rollback
public Rollback rollback()
This method provides access to the rollback tab of an executable object.- Returns:
- Rollback settings
-
taskIterator
public java.util.Iterator<JobPlanTask> 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
public JobPlanTask getFirstTaskByName(java.lang.String name)
Returns the first task in the JobPlan monitor which has the specified object name.- Parameters:
name
- Name of the UC4 object- Returns:
- Task or
null
if not found
-
getTaskByUserDefinedID
public JobPlanTask getTaskByUserDefinedID(java.lang.String id)
Returns a worfkflow task with the specified ID.- Parameters:
id
- ID of the task- Returns:
- Task or
null
if not found
-
addTask
public void addTask(JobPlanTask task)
Adds a task to theJobPlan
.- Parameters:
task
- JobPlan task
-
removeTask
public boolean removeTask(JobPlanTask task)
Removes the specified task from theJobPlan
.- Parameters:
task
- JobPlan task which should be removed- Returns:
- True if the task was removed successfully
-
header
public XHeader header()
Returns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- header
-
syncs
public SyncList syncs()
Returns aSyncList
object which contains sync conditions of this object.- Returns:
- sync conditions
-
runtime
public Runtime runtime()
Returns runtime information of this job. This corresponds to the "Runtime" tab in the dialog client.- Returns:
- Runtime information
-
deployment
public Deployment deployment()
This method provides access to the deployment tab of a ProcessFlow.- Returns:
- Deployment settings
-
getProcess
public java.lang.String getProcess()
Returns the content of the "Process" tab.- Returns:
- JCL
-
setProcess
public void setProcess(java.lang.String script)
Sets the content of the "Process" tab.- Parameters:
script
- Script
-
attributes
public JobPlanAttributes attributes()
Returns attributes of thisJobPlan
.- Returns:
- JobPlan attributes
-
getEndTask
public JobPlanTask getEndTask()
Returns the END-task of thisJobPlan
. A JobPlan always has an END task- Returns:
- END task
-
getStartTask
public JobPlanTask 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, org.w3c.dom.Element objectElement, ConnectionAttributes sessionInfo)
-
format
public void format()
Calculates the position of all tasks in thisJobPlan
.
-
validate
public void validate() throws java.io.InvalidObjectException
Description copied from class:UC4Object
Validates the object. If the object is not valid anInvalidObjectException
is thrown.
-
replaceTask
public void replaceTask(JobPlanTask oldTask, JobPlanTask newTask)
Replaces an existingJobPlanTask
.- Parameters:
oldTask
- JobPlanTask which should be replacednewTask
- JobPlanTask which replaces the old task
-
closeJobPlanTasks
public void closeJobPlanTasks(TaskState when)
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:UC4Object
Returnstrue
if this Object can be executed.- Specified by:
isExecutable
in classUC4Object
- Returns:
- true if the Object can be executed, false if not.
-
update
public void update()
Description copied from interface:WorkflowInterfaces.IUpdatable
Update the object (i.e. recalculate internal properties, sort tasks, ...)- Specified by:
update
in interfaceWorkflowInterfaces.IUpdatable
-
afterSaveObject
public void afterSaveObject()
Description copied from interface:LifecycleSaveAware
Called after an object is saved.- Specified by:
afterSaveObject
in interfaceLifecycleSaveAware
-
-