Click or drag to resize

RuntimeServiceUpdateParticipant Method

Updates a participant. Intended for web use only. A participant's scope or process reference cannot be updated.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: 7.6.0.0 (7.6.0.0)
Syntax
public void UpdateParticipant(
	string participantName,
	string participantDefinition
)

Parameters

participantName
Type: SystemString
Name of the participant to get.
participantDefinition
Type: SystemString
Definition of the participant to update. Element names are case sensitive.
Remarks
Available since WorkflowGen version: 6.2.0

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.

ParticipantId (int)Specifies the Id of the participant to update. Supercedes the participant name.
ProcessId (int)Specifies the Id of the process the participant is linked to for the update. Supercedes a combination of process name and process version.
ProcessName (string)Specifies the name of the process the participant is linked to for the update.
ProcessVersion (int)Specifies the version of the process the participant is linked to for the update.
IgnoreMissingAssociations (bool)Sets whether or not to return an error when an association (user, group, directory) is missing from the target. Default = true.
Sample participant definition to update a description:
<Participant>
  <Description>My new description</Description>
</Participant>
Updatable fields for a global participant (via participantName):
<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>
</Participant>
Updatable fields for a process participant (via participantName, processName and processVersion):
<Participant>
  <ID>874</ID>
  <Name>MYGLOBALPARTICIPANT</Name>
  <Description>My desc</Description>
  <Type>HUMAN</Type>                                   <!-- HUMAN, ROLE, COORDINATOR -->
  <Scope>GLOBAL</Scope> <!-- not updatable -->         <!-- GLOBAL, PROCESS -->
  <Associations>
    <Users>
      <User>
        <Username>wfgen_admin</Username>
      </User>
    </Users>
    <Groups />
    <Directories />
    <Coordinators />
  </Associations>
  <Process> <!-- not updatable -->
    <Name>MYPROCESS</Name> <!-- not updatable -->
    <Version>1</Version> <!-- not updatable -->
  </Process> <!-- not updatable -->
  <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>
Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.ParticipantHeader myParticipantHeader = new RuntimeServiceWebService.ParticipantHeader();
myRuntimeService.ParticipantHeaderValue = myParticipantHeader;

myParticipantHeader.ParticipantId = participantId;
myParticipantHeader.ProcessId = processId;
myParticipantHeader.IgnoreMissingAssociations = false;

myRuntimeService.UpdateParticipant(participantName, participantDefinition);

See Also