스크립트에서 작업 정의

권한 부여 관리자에서 작업은 애플리케이션의 하위 수준 함수 또는 메서드입니다. 이러한 작업은 작업으로 함께 그룹화됩니다. 애플리케이션 사용자가 작업을 완료할 수 있는 권한을 요청합니다. 작업은 IAzOperation 개체로 표시됩니다. 작업에 대한 자세한 내용은 작업 및 작업을 참조하세요.

다음 예제에서는 권한 부여 정책 저장소에서 작업을 정의하는 방법을 보여 줍니다. 이 예제에서는 C 드라이브의 루트 디렉터리에 MyStore.xml 라는 기존 XML 정책 저장소가 있고 이 저장소에 Expense라는 애플리케이션이 포함되어 있다고 가정합니다.

'  Create the AzAuthorizationStore object.
Dim AzManStore
Set AzManStore = CreateObject("AzRoles.AzAuthorizationStore")

'  Initialize the authorization store.
AzManStore.Initialize 2, "msxml://C:\MyStore.xml"

'  Open the application object in the store.
Dim expenseApp
Set expenseApp= AzManStore.OpenApplication("Expense")

'  Create operations.

'  Create first operation.
Dim Op1
Set Op1 = expenseApp.CreateOperation("RetrieveForm")

'  Set the OperationID property.
Op1.OperationID = 1

'  Save the operation to the store.
Op1.Submit

'  Create second operation.
Dim Op2
Set Op2 = expenseApp.CreateOperation("EnqueRequest")

'  Set the OperationID property.
Op2.OperationID = 2

'  Save the operation to the store.
Op2.Submit

'  Create third operation.
Dim Op3
Set Op3 = expenseApp.CreateOperation("DequeRequest")

'  Set the OperationID property.
Op3.OperationID = 3

'  Save the operation to the store.
Op3.Submit

'  Create fourth operation.
Dim Op4
Set Op4 = expenseApp.CreateOperation("UseFormControl")

'  Set the OperationID property.
Op4.OperationID = 4

'  Save the operation to the store.
Op4.Submit

'  Create fifth operation.
Dim Op5
Set Op5 = expenseApp.CreateOperation("MarkFormApproved")

'  Set the OperationID property.
Op5.OperationID = 5

'  Save the operation to the store.
Op5.Submit

'  Create sixth operation.
Dim Op6
Set Op6 = expenseApp.CreateOperation("SendApprovalNotify")

'  Set the OperationID property.
Op6.OperationID = 6

'  Save the operation to the store.
Op6.Submit