Skip to main content

most places i go in K2 seem to use <DOMAIN>
tid to identify people. for example if i'm editng a mail event, and go the context browser->workflow context tab->process instance->Originator->Name and add it in my email body i get the ID in the format above. When I try and pass the <DOMAIN>
tid to the Active Directory Server2 service object, it throws an error with 'Could not resolve user: <DOMAIN>
tid; ServiceName: ADService2; ServiceGuid: 83ac8763-ab63-4f86-8bc8-9bde8729b735; InnerExceptionMessage:'


 If i just put in in ntid it works perfectly. i've tested this via the the 'SmartObject Service Tester.exe' program too, and i get the same behavior. I cant find an easy way to strip of the domain name part, when calling the active directory server2. Ideally i would actually want it to accept <DOMAIN>
tid, so that I dont have to strip the domain part, every time i use the smart object.


 


Any idea welcome.


thanks.


 

To solve this problem (and others where I need to manipulate strings, perform complex mathematical calculations, etc.) I have created a simple static assembly that has a method that takes three input string parameters:  original, stringToReplace, stringToReplaceWith.  The method simply returns the new string, so if you want to remove the <domain> string, you just pass in "" as the stringToReplaceWith method.  I then register this assembly using the Dynamic Assembly Service service object found in the blackmarket and then build a 'Utility' SmartObject that consumes the static method.  This is actually just one example of a 'Utility' assembly that I use quite frequently.  The blackmarket project actually has good sample documentation as well.


thanks for the advice.


 it does seem a little strange that the AD smartobject doesnt work out of the box with the process designer. i would assume this means that everyone has to write a 'translation' layer to use it with their process?


You should be able to use either format.  Is this user in your primary domain or another domain?  If so, take a look at the instructions in the getting started guide about adding additional domains.  If that is not the case, you might want to opena helpdesk ticket and have them help you check the configuration settings for your AD2 Service.

Reply