Documentation ¶
Overview ¶
Package workflow contains an experimental workflow for Archivemica transfers.
It's not generalized since it contains client-specific activities. However, the long-term goal is to build a system where workflows and activities are dynamically set up based on user input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MoveWorkflow ¶
type MoveWorkflow struct {
// contains filtered or unexported fields
}
func NewMoveWorkflow ¶
func NewMoveWorkflow(pkgsvc package_.Service) *MoveWorkflow
func (*MoveWorkflow) Execute ¶
func (w *MoveWorkflow) Execute(ctx temporalsdk_workflow.Context, req *package_.MoveWorkflowRequest) error
type ProcessingWorkflow ¶
type ProcessingWorkflow struct {
// contains filtered or unexported fields
}
func NewProcessingWorkflow ¶
func NewProcessingWorkflow( cfg config.Configuration, rng io.Reader, pkgsvc package_.Service, wsvc watcher.Service, ) *ProcessingWorkflow
func (*ProcessingWorkflow) Execute ¶
func (w *ProcessingWorkflow) Execute(ctx temporalsdk_workflow.Context, req *package_.ProcessingWorkflowRequest) error
ProcessingWorkflow orchestrates all the activities related to the processing of a SIP in Archivematica, including is retrieval, creation of transfer, etc...
Retrying this workflow would result in a new Archivematica transfer. We do not have a retry policy in place. The user could trigger a new instance via the API.
func (*ProcessingWorkflow) SessionHandler ¶
func (w *ProcessingWorkflow) SessionHandler( sessCtx temporalsdk_workflow.Context, attempt int, tinfo *TransferInfo, ) (e error)
SessionHandler runs activities that belong to the same session.
type SendToFailed ¶ added in v0.2.0
Send to failed variables used to keep track of the SIP/PIP location, if it requires zipping (a3m PIP) and what activity needs to be called to be uploaded to the expected bucket.
type Timer ¶
func (*Timer) WithTimeout ¶
func (t *Timer) WithTimeout( ctx temporalsdk_workflow.Context, d time.Duration, ) (temporalsdk_workflow.Context, temporalsdk_workflow.CancelFunc)
type TransferInfo ¶
type TransferInfo struct { // IsDir indicates whether the current working copy of the transfer is a // filesystem directory. IsDir bool // PackageType is the type of the package. PackageType enums.PackageType // TempPath is the temporary location of a working copy of the transfer. TempPath string // SIPID given by a3m. // // It is populated by CreateAIPActivity. SIPID string // Path to the compressed AIP generated by the preservation system. // // It is populated once the preservation system creates the AIP. AIPPath string // StoredAt is the time when the AIP is stored. // // It is populated by PollIngestActivity as long as Ingest completes. StoredAt time.Time // Information about the bundle (transfer) that we submit to Archivematica. // Full path, relative path... // // It is populated by BundleActivity. Bundle activities.BundleActivityResult // Identifier of the preservation action that creates the AIP // // It is populated by createPreservationActionLocalActivity . PreservationActionID int // Identifier of the preservation system task queue name // // It is populated by the workflow request. GlobalTaskQueue string PreservationTaskQueue string // Send to failed information. SendToFailed SendToFailed // contains filtered or unexported fields }
TransferInfo is shared state that is passed down to activities. It can be useful for hooks that may require quick access to processing state.
func (*TransferInfo) Name ¶
func (t *TransferInfo) Name() string
Directories ¶
Path | Synopsis |
---|---|
Package activities implements Enduro's workflow activities.
|
Package activities implements Enduro's workflow activities. |