Issue
When calling the complete activity instance web service I get the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
at Advantys.My.Globalization.TimeZoneInformation.GetTimeZone(Int32 timezoneIdentifier)
at Advantys.Workflow.Web.Services.Processes.Runtime.RuntimeService.CompleteActivityInstance(Int32 processInstanceId, Int32 activityInstanceId, String workflowContext)
Configuration
-
The
wfgen_adminusername is entered asmydomain/wfgen_admin -
The
ApplicationSecurityRemoveDomainPrefixentry in theweb.configfile has been set to_all. -
If we remove the
web.configsetting we will get a user is not a participant error when trying to callcompleteactivity.
Cause
The _all value in the ApplicationSecurityRemoveDomainPrefix parameter removes the domain name in the login name, which is why you are getting the error message, because the user is no longer found in the database after the domain name was removed from the login name:
-
The user’s username is stored as
mydomain\wfgen_adminin the database. -
ApplicationSecurityRemoveDomainPrefixis set to_all, which removes the domain name from login name -
When you log in with
mydomain\wfgen_admin, this will becomewfgen_adminonceApplicationSecurityRemoveDomainPrefixis applied. -
WorkflowGen then tries to find a user where username is equal to
wfgen_admin, but couldn’t find it because the username is stored asmydomain\wfgen_admin.
Solution
The solution is to not skip the domain name for users whose usernames are prefixed by a domain name.