Package de.uka.ipd.sdq.workflow.mdsd.oaw
Class AbstractOAWWorkflowJobBridge<T extends org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent>
- java.lang.Object
-
- de.uka.ipd.sdq.workflow.mdsd.oaw.AbstractOAWWorkflowJobBridge<T>
-
- Type Parameters:
T
- The class of the oAW job bridged by an specific instance of this class
- All Implemented Interfaces:
IJob
- Direct Known Subclasses:
XpandGeneratorJob
public abstract class AbstractOAWWorkflowJobBridge<T extends org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent> extends Object implements IJob
This class allows the use of jobs of the openArchitectureWare workflow engine as part of the SDQ workflow engine.
-
-
Constructor Summary
Constructors Constructor Description AbstractOAWWorkflowJobBridge(T job)
Constructor of the oAW bridge.AbstractOAWWorkflowJobBridge(T job, HashMap<String,Object> slotContents)
Constructor of the oAW bridge.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cleanup(IProgressMonitor monitor)
Clean up all temporary side effects of this job.void
execute(IProgressMonitor monitor)
Execute the job.String
getName()
Supply a name of this job.protected void
setupContext(WorkflowContext ctx)
Creates the oAW job'sWorkflowContext
.protected abstract void
setupOAWJob(T oawJob2)
Template method in which hiers can add logic to configure their specific oAW jobs.
-
-
-
Field Detail
-
oawJob
protected T extends org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent oawJob
The oaw job.
-
-
Constructor Detail
-
AbstractOAWWorkflowJobBridge
public AbstractOAWWorkflowJobBridge(T job)
Constructor of the oAW bridge.- Parameters:
job
- The oAW job to wrap for execution in the Palladio workflow engine
-
AbstractOAWWorkflowJobBridge
public AbstractOAWWorkflowJobBridge(T job, HashMap<String,Object> slotContents)
Constructor of the oAW bridge.- Parameters:
job
- The oAW job to wrap for execution in the Palladio workflow engineslotContents
- Contains models of the oAW workflow engine's blackboard, i.e., models to be transformed by the encapsulated oAW job
-
-
Method Detail
-
execute
public void execute(IProgressMonitor monitor) throws JobFailedException, UserCanceledException
Description copied from interface:IJob
Execute the job. In case of an error throw an exception with a meaningful name which can be understood by a user.- Specified by:
execute
in interfaceIJob
- Parameters:
monitor
- the monitor- Throws:
JobFailedException
- the job failedUserCanceledException
- the user has chosen to abort the job
-
setupContext
protected void setupContext(WorkflowContext ctx)
Creates the oAW job'sWorkflowContext
.- Parameters:
ctx
- The context to configure. Add all the models needed by the oAW job
-
setupOAWJob
protected abstract void setupOAWJob(T oawJob2)
Template method in which hiers can add logic to configure their specific oAW jobs.- Parameters:
oawJob2
- The job to be set up
-
getName
public String getName()
Description copied from interface:IJob
Supply a name of this job. This could be used for a progress monitor.
-
cleanup
public void cleanup(IProgressMonitor monitor) throws CleanupFailedException
Description copied from interface:IJob
Clean up all temporary side effects of this job. This method will always be called after executing this job to remove automatically created files and to leave the environment in a state in which the whole workflow run can be started again with the same results (i.e. in which executed can be called again). Usually, cleanup is called after the whole workflow is completed to allow other jobs to use intermediate results. In some cases, cleanup can be called earlier. However, in those cases, later jobs might not be able to access the intermediate data anymore.- Specified by:
cleanup
in interfaceIJob
- Parameters:
monitor
- the monitor- Throws:
CleanupFailedException
- Thrown if a critical error occurred during clean up so that the whole workflow should abort cleaning up further jobs.
-
-