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

This session creates, updates, and deletes Processes. 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 Process, a ProcessForm is requested using getProcessFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ProcessForm 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 ProcessForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ProcessForm corresponds to an attempted transaction.

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

The delete operations delete Processes. To unmap a Process from the current Office, the ProcessOfficeAssignmentSession should be used. These delete operations attempt to remove the Process 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.
MethodcanCreateProcesses
Description

Tests if this user can create Process. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Process 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 Process creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateProcessWithRecordTypes
Description

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

Parametersosid.type.Type[]processRecordTypesarray of process record types
Returnboolean true if Process creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT processRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetProcessFormForCreate
Description

Gets the process form for creating new processes. A new form should be requested for each create transaction.

Parametersosid.type.Type[]processRecordTypesarray of process record types
Returnosid.workflow.ProcessFormthe process form
ErrorsNULL_ARGUMENT processRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateProcess
Description

Creates a new Process.

Parametersosid.workflow.ProcessFormprocessFormthe form for this Process
Returnosid.workflow.Processthe new Process
ErrorsILLEGAL_STATE processForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT processForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED processForm did not originate from getProcessFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateProcesses
Description

Tests if this user can update Processes. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Process 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 Process modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetProcessFormForUpdate
Description

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

Parametersosid.id.IdprocessIdthe Id of the Process
Returnosid.workflow.ProcessFormthe process form
ErrorsNOT_FOUND processId is not found
NULL_ARGUMENT processId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProcess
Description

Updates an existing process.

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

Tests if this user can delete Processes. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Process 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 Process deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteProcess
Description

Deletes a Process.

Parametersosid.id.IdprocessIdthe Id of the Process to remove
ErrorsNOT_FOUND processId not found
NULL_ARGUMENT processId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageProcessAliases
Description

Tests if this user can manage Id aliases for Process. 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 Process aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasProcess
Description

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

Parametersosid.id.IdprocessIdthe Id of a Process
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND processId not found
NULL_ARGUMENT processId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanAssignCompetencies
Description

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

Returnboolean false if competency assignment is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaddCompetency
Description

Adds a competency to a process.

Parametersosid.id.IdprocessIdthe processId Id
osid.id.IdcompetencyIdthe competency Id
ErrorsALREADY_EXISTScompetency already part of work
NOT_FOUND competencyId or processId is not found
NULL_ARGUMENT competencyId or processId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveCompetency
Description

Removes a competency from a process.

Parametersosid.id.IdprocessIdthe process Id
osid.id.IdcompetencyIdthe competency Id
ErrorsNOT_FOUNDcompetency is not part of process
NULL_ARGUMENT processId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveCompetencies
Description

Removes all competency from a process.

Parametersosid.id.IdprocessIdthe process Id
ErrorsNOT_FOUND processId is not found
NULL_ARGUMENT processId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.