RuntimeServiceCreateGroup Method |
Namespace: Advantys.Workflow.Web.Services.Processes.Runtime
Optional Parameters.
These parameters can be used in the query string or as parameters of the Headers object in the RuntimeService class instance. See example below.
ReplaceIfExists (bool) | Sets whether or not to replace a group with the same name. Default = false |
IgnoreMissingAssociations (bool) | Sets whether or not to return an error when an association (user) is missing from the target. Default = true |
<Group> <Name>My group</Name> <Description>My group's description</Description> <Directory> <Name>WorkflowGen</Name> </Directory> <Email>MyGroupEmail@WorkflowGen.com</Email> <LDAP_ADsPath>ADs Path</LDAP_ADsPath> <DistinguishedName>Distinguished name</DistinguishedName> <CommonName>Common name</CommonName> <Code>Code</Code> <SystemIdentifier>System identified</SystemIdentifier> <Synchronized>Y</Synchronized> <!-- Y, N --> <Users> <User> <Username>Username1</Username> </User> <User> <Username>Username2</Username> </User> </Users> </Group>
<Group> <Name>My group</Name> <Description>My group's description</Description> <Directory> <Name>WorkflowGen</Name> </Directory> <Email>MyGroupEmail@WorkflowGen.com</Email> <LDAP_ADsPath>ADs Path</LDAP_ADsPath> <DistinguishedName>Distinguished name</DistinguishedName> <CommonName>Common name</CommonName> <Code>Code</Code> <SystemIdentifier>System identified</SystemIdentifier> <Synchronized>Y</Synchronized> <DataSourceQuery>DEPARTMENT = 'Accounting'</DataSourceQuery> </Group>
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService(); RuntimeServiceWebService.GroupHeader myGroupHeader = new RuntimeServiceWebService.ImportGroupHeader(); myRuntimeService.GroupHeaderValue = myImportGroupHeader; myGroupHeader.ReplaceIfExists = replaceIfExists; myGroupHeader.IgnoreMissingAssociations = ignoreMissingAssociations; int groupId = myRuntimeService.CreateGroup(groupDefinition);