AssignActivity
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords"> assignActivity, assign activity, assignActivityAsString, assign activity as string, assign activity string, SOA Layer, SOA, WorkflowEngineSOA, Workflow Engine SOA, workflow engine, workflowengine </keywords>
Contents |
assignActivity
A method from the WorkflowEngineSOA web service used to assign (reassign) an Activity to a user, done from an external application.
This document also applies to the method assignActivityAsString.
Description
This method provides the possibility to assign a specific user to an activity via SOA layer.
This method's invocation is handy to enable a case to proceed, as it assigns/reassigns a specific activity to a specific work portal user.
The method assignActivity receives and returns an XmlDocument while assignActivityAsString receives and returns a string (which contains the XML information and format).
Input Data
Below is the schema of the expected XML (you may copy it directly from here):
Parameter 1 (XmlDocument or String Type)
BizAgiWSParam: It is the "Root" node. It is mandatory and contains all the necessary information to execute the Activity.
CaseInfo: It is a mandatory element which specifies in its inner nodes the information related to the Activity's assignation.
AssignedByIdUser: It is the element that defines the identification of the user in Bizagi who is currently assigned to the Activity.
The current assignee should be specified in the XML. If this element is not present, then the AssignedByUserName can be specified.
However, when neither of these two elements are specified, the information for the current assignee will be taken by default as the "domain\admon" user.
AssignedByUserName: It is the element that defines the name of the user in Bizagi (and its domain), who is currently assigned to the Activity.
The expected value for this element should include the domain before a backslash. For example: "domain\admon".
The current assignee should be specified in the XML. If this element is not present, then the AssignedByIdUser can be specified.
However, when neither of these two elements are specified, the information for the current assignee will be taken by default as the "domain\admon" user.
IdCase: It is the element that defines the case identification for the specific case's activity which will be assigned.
Specifying the case is necessary ("mandatory"). If this element is not specified in the XML, then at least the element CaseNumber must be included.
CaseNumber: It is the element that defines the case radication's number for the specific case's activity which will be assigned.
Specifying the case is necessary ("mandatory"). If this element is not specified in the XML, then at least the element IdCase must be included.
IdTask: It is the element that defines the identification number of the Activity which will be assigned.
Specifying the task (activity to be assigned) is necessary ("mandatory"). If this element is not specified in the XML (if the idTask is unknown for that task), then at least the element TaskName must be included.
TaskName: It is the element that defines the name of the Activity which will be assigned.
Specifying the task (activity to be assigned) is necessary ("mandatory"). If this element is not specified in the XML (if the TaskName is unknown for that task), then at least the element IdTask must be included.
IdWorkItem: It is the element that defines the id of the workitem record (the instance for the case's task to be assigned).
Its use is optional to specify the task for the case to be assigned. This definition can replace the specification for Case (IdCase or CaseNumber) and Task (IdTask or TaskName).
For example, if the IdWorkItem is specified in the XML, then none of: IdCase, CaseNumber, IdTask or TaskName are required.
IdUser: It is the identification of the user in Bizagi, who will be assigned as the performer of the Activity.
Specifying the user for the assignation of the activity is mandatory. If this element is not specified in the XML, then at least the element UserName must be included.
UserName: It is the name of the user in Bizagi (and its domain), who will be assigned as the performer of the Activity.
The expected value for this element should include the domain before a backslash. For example: "domain\admon".
Specifying the user for the assignation of the activity is mandatory. If this element is not specified in the XML, then at least the element IdUser must be included.
Example
In the following example XML, the user domain\admon was in charge of the EvaluateRequest activity but has now delegated this Activity so that the user domain\edwardg is reassigned to it.
Output Data
Below is the schema definition for the returned XML (you may copy it directly from here):The response is treated differently if the task is assigned correctly or if there is an error due to the specified information.
If the method's invocation is succesful, then the message returned is "Reassign succesfull" (the value for the element BizAgiWSResponse).
On the other side if the invocation is not succesful, a detail of the error is returned.
For this scenario, the elements returned are as follows:
processes: It is the "Root" node. It contains the XML document information.
process: It is the element that contains the invocation error detail.
processId: It has the process identification.
processRadNumber: It has the alphanumeric value that corresponds to the creation number of the case.
processError: It has the description (code and message) of the error while attempting the activity's assignment.
errorCode: It contains the unique code of the error.
errorMessage: It contains the specific error message.
Related Articles
<comments />