WrapperCreator and executed by the Submitter.
The executable of context WORKUNIT is created by the Programflow of a Workunit-executable
The program flow is depending on the Submitter and the application. But some steps have to be done always.- get the externaljobid (could be done from commandline or it might be already hardcoded in the executable code)
- read the externaljob
- usually the submitter sets the status of the externaljob to "running" on execution.
- the workunit executable can set the status to give feedback how much work is already done, or which steps are currently executed
- parse the workunitid from the externaljob (cliententityid)
- (optional) create the resources in B-Fabric (SOAP) which are expected and set them to "pending" (resourceid is returned)
- (optional) create a temporary directory on the scratchspace if needed
- run the application
- options and input/output files need to be configured
- write the generated data to the storage
- the output need to be transfered to the storage with is defined in the application
- the destination can be read from storage and access (access type "SCP"): hostname, relativepath, projectprefix
- tell B-Fabric about the generated resources
- create the resources if not already done
- or update the resources which are already created in B-Fabric (pending)
- set the status of the resources to available in B-Fabric (SOAP)
- (optional) you can tell B-Fabric about the size, checksum and other attibutes of the file.
- give feedback via logthis of the externaljob of this workunitexecutable (e.g. debug)
- (optional) update the status ("done" or "failed")
- return the correct exit code, because the submitter will set the status accordingly