RuntimeServiceCreateParticipant 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 participant with the same name. Default = false. |
IgnoreMissingAssociations (bool) | Sets whether or not to return an error when an association (user, group, directory) is missing from the target. Default = true. |
<Participant> <Name>MYGLOBALPARTICIPANT</Name> <Description>My desc</Description> <Type>HUMAN</Type> <!-- HUMAN, ROLE, COORDINATOR --> <Scope>GLOBAL</Scope> <!-- GLOBAL, PROCESS --> <Associations> <Users> <User> <Username>wfgen_admin</Username> </User> </Users> <Groups /> <Directories /> <Coordinators /> </Associations> <Process /> </Participant>
<Participant> <Name>MYGLOBALPARTICIPANT</Name> <Description>My desc</Description> <Type>HUMAN</Type> <!-- HUMAN, ROLE, COORDINATOR --> <Scope>GLOBAL</Scope> <!-- GLOBAL, PROCESS --> <Associations> <Users> <User> <Username>wfgen_admin</Username> </User> </Users> <Groups /> <Directories /> <Coordinators /> </Associations> <Process> <Name>MYPROCESS</Name> <Version>1</Version> </Process> <Role>SUPERVISOR</Role> <!-- REQUESTER, ACTOR, SUPERVISOR --> <ViewGraphics>Y</ViewGraphics> <!-- Y, N --> <ReassignAction>Y</ReassignAction> <!-- Y, N --> <CancelRequest>Y</CancelRequest> <!-- Y, N --> <ViewStatistics>Y</ViewStatistics> <!-- Y, N --> <CommentsPermissions>RW</CommentsPermissions> <!-- R, RW --> <DatasourceQuery> </DatasourceQuery> </Participant>
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService(); RuntimeServiceWebService.ParticipantHeader myParticipantHeader = new RuntimeServiceWebService.ParticipantHeader(); myRuntimeService.ParticipantHeaderValue = myParticipantHeader; myParticipantHeader.ReplaceIfExists = replaceIfExists; myParticipantHeader.IgnoreMissingAssociations = ignoreMissingAssociations; int myCreatedParticipantId = myRuntimeService.CreateParticipant(participantDefinition);