In version 6 i was able to create a script, that creates ITShop orders using a CallMethod.
Now in version 8.02 i need to do the same but the old script does not work.
Also noticed there is challenge-role loss procedure. Ok, in short the use case is this :
* Employee enters the system from HR, properties mapped into the Person object
* Business Role gets dynamically assigned based on dynamic role, if your PersonalTitle contains "IT" you get the business role "IT".
* When this users' data is changed to "non-CT" the role "IT" is gone as the dynamic role does not apply anymore
* Also, when this user gets additional business role from somebody doing an assignment using Manager and that assignment gets deleted, i need to give this user his deleted role for only 2 monith.
SO i want to use the CallMethod for ITShop order to create the deleted Business Roles as a request.
My old script is below, but that does not work from my Custom Process which looks at " update" events in PersonInOrg.
Public Sub CCC_FillOrder(strUIDITShopOrg As String, strUidBusOrg As String, strUidPersonRcpt As String, strUIDPersonManager As String) Dim pBag As New PropertyBag ' assign all required fields pBag.PutValue("UID_Org", "778EEFB5-40EA-435F-BB12-8EBBC1924FE7") 'ITShop Role pBag.PutValue("UID_PersonOrdered", "765104ee-1ced-4801-bfd5-a83f67f2bd30") 'UID_Person recipient, Zierik01 pBag.PutValue("UID_PersonInserted", "39da8364-0c9c-443a-817a-65e2e72426f3") 'Harry Appelboom pBag.PutValue("UID_PersonHead", "39da8364-0c9c-443a-817a-65e2e72426f3") 'Manager, Harry Appelboom pBag.PutValue("UID_OrgParentofParent", "5827ee11-6e8c-4330-9701-cfd1b6bf6642") 'OrgParentOfParent pBag.PutValue("OrderReason", "Aanvraag voor tempRole via injectie") 'Reden van de aanvraag pBag.PutValue("OrderDate", Date.Today) pBag.PutValue("OrderState","OrderProduct") 'Must be set to correct value to create a request pBag.PutValue("UID_OrgParent", "10a35f77-e0ae-4929-8784-cc71447701d7") 'UIDOrgParent '<Key><T>PersonInOrg</T><P>80f9bcad-b283-47cc-85e8-836f780fb25b</P><P>765104ee-1ced-4801-bfd5-a83f67f2bd30</P></Key> 'UID_Org from Org wat je aan wilt vragen + de recipient userID ' create a new request object Dim dbPwO As ISingleDbObject = Connection.CreateSingle("PersonWantsOrg") Dim objectkey = "<Key><T>PersonInOrg</T><P>80f9bcad-b283-47cc-85e8-836f780fb25b</P><P>765104ee-1ced-4801-bfd5-a83f67f2bd30</P></Key>" pBag.PutValue("ObjectKeyAssignment", objectkey) ' this method can only be called from the Q1IM service! ' Running in Designer or SystemLibrary will throw an exception ' Create a process which runs this script dbPwO.Custom.CallMethod("FillOrder", pBag) End Sub