Creating Bulk Operators through a Repeat Grid On a Button Click
I would like to share a support article for creating Bulk or list of Operators in PRPC system along with Pre Populated AccessGroup, WorkGroup, Organization, Division, Unit, User Name and Password.
As we know, OperatorID is an instance of Data-Admin-Operator-ID Class, when we create operator record, it creates instance in the above class.
Steps to develop:
1. Create a Table(Repeat Grid) sourced with a Pagelist property sourced by Data-Admin-Operator-ID class.
2. Now map the following properties AccessGroup, WorkGroup, Organization, Division, Unit, User Name and Password in the repeat grid.
3. In the Post Processing, write an activity and perform the following steps:
a) Loop on the PageList which we have given as source to Repeat Grid.
b) Inside the Loop, create a New Page Ex: NewOperator with class Data-Admin-Operator-ID
c) Now Set the values of each record of the pagelist to pyAccessGroup, pyOrganization, pyOrgDivision, pyOrgUnit, pyUserIdentifier and pypwdCurrent to the properties on NewOperator Page.
d) Save each record within the loop with Obj-Save method with stepPage defined as NewOperator.(This will create each operator record available in the pagelist)
Now go to Records Explorer>>>Organization>>>OperatorID
You can see the Created Operator Instances. Now to try to login with the created Operator Credentials and test it.
1. We are creating operator instances that is fine, but we need to check the exceptional scenarios as well that may break the logic. Ex: If Operator record that user creates is already existed in the system, then we need to handle this scenario.
To handle this, Within the loop, We need to check every record if already existed in the Data-Admin-Operator-ID class or not.
a) Within thOperae Loop, Define a DataPage Ex: D_OperatorsList[OperatorID:Param.OperatorID]
Pass the pyUserIdentifier value of every record to Param.OperatorID and check it by capturing the ResultCount of the DataPage like D_OperatorsList[OperatorID:Param.OperatorID].pxResultCount.
If pxResultCount>1 then skip the Operator Creation and Set the Error Message using Property-Set-Messages as "Operator Already Exists", in the transition Step Exit Iteration.
For reference, I have attached the Word Document with Screenshots, Please find the attachment
It's good starting point, to create operators. But there are other dimensions to it also
1) In step 3.b, I guess if we can open the instance from ModalOperators(like saveas,), then some OOTB properties which are not inputted by user in Grid can be defaulted(e.g TimeZone, change password for next login etc)
2) Normally in Live users are created in Bulk(one solution is "We can extend this solution to import the excel into grid")
3) Access Group and Work Groups may be multiple, need to see a way how user can enter them in grid.
4) solution need to be extended for inputting Skill and Skill ratting etc.