OSID Logo
OSID Specifications
workflow package
Version 3.0.0
Release Candidate Preview
Interfaceosid.workflow.StepAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Steps. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Step, a StepForm is requested using getStepFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned StepForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the StepForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each StepForm corresponds to an attempted transaction.

For updates, StepForms are requested to the Step Id that is to be updated using getStepFormForUpdate(). Similarly, the StepForm has metadata about the data that can be updated and it can perform validation before submitting the update. The StepForm can only be used once for a successful update and cannot be reused.

The delete operations delete Steps. To unmap a Step from the current Office, the StepOfficeAssignmentSession should be used. These delete operations attempt to remove the Step itself thus removing it from all known Office catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetOfficeId
Description

Gets the Office Id associated with this session.

Returnosid.id.Idthe Office Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetOffice
Description

Gets the Office associated with this session.

Returnosid.workflow.Officethe office
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateSteps
Description

Tests if this user can create Steps. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Step will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Step creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateStepWithRecordTypes
Description

Tests if this user can create a single Step using the desired record types. While WorkflowManager.getStepRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Step. Providing an empty array tests if a Step can be created with no records.

Parametersosid.type.Type[]stepRecordTypesarray of step record types
Returnboolean true if Step creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT stepRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetStepFormForCreate
Description

Gets the step form for creating new steps. A new form should be requested for each create transaction.

Parametersosid.id.IdprocessIda process Id
osid.type.Type[]stepRecordTypesarray of step record types
Returnosid.workflow.StepFormthe step form
ErrorsNOT_FOUND processId is not found
NULL_ARGUMENT processId or stepRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateStep
Description

Creates a new Step.

Parametersosid.workflow.StepFormstepFormthe form for this Step
Returnosid.workflow.Stepthe new Step
ErrorsILLEGAL_STATE stepForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT stepForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED stepForm did not originate from getStepFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateSteps
Description

Tests if this user can update Steps. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Step will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Step modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetStepFormForUpdate
Description

Gets the step form for updating an existing step. A new step form should be requested for each update transaction.

Parametersosid.id.IdstepIdthe Id of the Step
Returnosid.workflow.StepFormthe step form
ErrorsNOT_FOUND stepId is not found
NULL_ARGUMENT stepId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateStep
Description

Updates an existing step.

Parametersosid.workflow.StepFormstepFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE stepForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT stepForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED stepForm did not originate from getStepFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteSteps
Description

Tests if this user can delete Steps. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Step will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Step deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteStep
Description

Deletes a Step.

Parametersosid.id.IdstepIdthe Id of the Step to remove
ErrorsNOT_FOUND stepId not found
NULL_ARGUMENT stepId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageStepAliases
Description

Tests if this user can manage Id aliases for Steps. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Step aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasStep
Description

Adds an Id to a Step for the purpose of creating compatibility. The primary Id of the Step is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another step, it is reassigned to the given step Id.

Parametersosid.id.IdstepIdthe Id of a Step
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND stepId not found
NULL_ARGUMENT stepId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.