assignActivityAsString

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi from external applications > Bizagi API > SOAP web services > Available SOAP web services > WorkflowEngineSOA Web methods >

assignActivityAsString

Overview

 

This web method is used to reassign inbox Activities in Bizagi (from an external application).

 

This method receives mainly a filter for the case information, and which user will be reassigned to its open Activities.

This way, those Activities for the given cases are newly assigned to that particular user; in the same way as it could be done from the Admin options at the Work Portal.

For further information about reassigning cases from the Work Portal options, please refer to Bizagi Work Portal.

 

 

note_pin

The description provided in this article applies too for the assignActivity web method available in Bizagi .NET edition.

For the assignActivity method, the request and response XML's are of the native .NET XmlDocument type.

For the assignActivityAsString method the same XML structure is handled, but this parameter is sent as a string type.

 

 

Input

 

Input Schema

The following shows a sample XML structure of information to send to Bizagi:

 

<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="BizAgiWSParam">

     <xs:complexType>

        <xs:sequence>

           <xs:element name="CaseInfo">

              <xs:complexType>

                 <xs:sequence>

                    <xs:choice>

                       <xs:element name="AssignedByIdUser" type="xs:integer"/>

                       <xs:element name="AssignedByUserName" type="xs:string"/>

                    </xs:choice>

                    <xs:choice>

                       <xs:element name="IdUser" type="xs:integer"/>

                       <xs:element name="UserName" type="xs:string"/>

                    </xs:choice>

                    <xs:choice>

                       <xs:element name="IdWorkItem" minOccurs="0" type="xs:integer"/>

                       <xs:choice>

                          <xs:element name="IdCase" type="xs:integer"/>

                          <xs:element name="CaseNumber" type="xs:string"/>

                       </xs:choice>

                       <xs:choice>

                          <xs:element name="IdTask" type="xs:integer"/>

                          <xs:element name="TaskName" type="xs:string"/>

                       </xs:choice>

                    </xs:choice>

                 </xs:sequence>

              </xs:complexType>

           </xs:element>

        </xs:sequence>

     </xs:complexType>

  </xs:element>

</xs:schema>

 

 

Input Parameters

 

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 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 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 identification 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.

 

 

Input Example

With the following sample XML, case number 2 will have its current EvaluateRequest Task to be reassigned to the domain\admon user.

 

<BizAgiWSParam>

  <CaseInfo>

     <UserName>domain\admon</UserName>

     <IdCase>2</IdCase>

     <IdTask>EvaluateRequest</IdTask>

  </CaseInfo>

</BizAgiWSParam>

 

 

Output

 

Output Schema

The following shows a sample XML structure of information returned by Bizagi:

 

<?xml version="1.0" encoding="utf-8"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

 <xs:element name="Process">

         <xs:complexType>

                 <xs:sequence>

                         <xs:element name="ProcessId" type="xs:unsignedShort" />

                         <xs:element name="ProcessRadNumber" type="xs:unsignedShort" />

                         <xs:element name="savedMessage">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:element name="Entities" type="xs:string" />

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                         <xs:element name="ProcessWorkflowClass">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:element name="workflowClassId" type="xs:unsignedByte" />

                                                 <xs:element name="workflowClassName" type="xs:string" />

                                                 <xs:element name="workflowClassDisplayName" type="xs:string" />

                                                 <xs:element name="workflowClassDescription" type="xs:string" />

                                                 <xs:element name="workflowClassHelpText" type="xs:string" />

                                                 <xs:element name="workflowClassDisplayOrder" type="xs:unsignedByte" />

                                                 <xs:element name="workflowClassCreationDate" type="xs:string" />

                                                 <xs:element name="workflowClassGlobalForm" type="xs:unsignedByte" />

                                                 <xs:element name="workflowClassAllocationPrinciple" type="xs:string" />

                                                 <xs:element name="workflowClassProcessType" type="xs:string" />

                                                 <xs:element name="workflowClassDisplay" type="xs:string" />

                                                 <xs:element name="workflowClassUseParentRadicationNumber" type="xs:string" />

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                         <xs:element name="ProcessError">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:element name="errorCode" type="xs:string" />

                                                 <xs:element name="errorMessage">

                                                         <xs:complexType mixed="true">

                                                                 <xs:sequence minOccurs="0">

                                                                         <xs:element name="Entities">

                                                                                 <xs:complexType>

                                                                                         <xs:sequence>

                                                                                                 <xs:element name="Path" type="xs:string" />

                                                                                                 <xs:element name="Atrib" type="xs:string" />

                                                                                                 <xs:element name="Value" type="xs:string" />

                                                                                                 <xs:element name="ErrorMessage" type="xs:string" />

                                                                                         </xs:sequence>

                                                                                 </xs:complexType>

                                                                         </xs:element>

                                                                 </xs:sequence>

                                                         </xs:complexType>

                                                 </xs:element>

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                         <xs:element name="CurrentWorkItems">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:element name="workItem">

                                                         <xs:complexType>

                                                                 <xs:sequence>

                                                                         <xs:element name="workItemId" type="xs:unsignedShort" />

                                                                         <xs:element name="workItemState" type="xs:string" />

                                                                         <xs:element name="workItemEntryDate" type="xs:string" />

                                                                         <xs:element name="workItemDuration" type="xs:unsignedByte" />

                                                                         <xs:element name="workItemEstimatedSolutionDate" type="xs:string" />

                                                                         <xs:element name="task">

                                                                                 <xs:complexType>

                                                                                         <xs:sequence>

                                                                                                 <xs:element name="taskId" type="xs:unsignedByte" />

                                                                                                 <xs:element name="taskName" type="xs:string" />

                                                                                                 <xs:element name="taskDisplayName" type="xs:string" />

                                                                                                 <xs:element name="taskDescription" type="xs:string" />

                                                                                                 <xs:element name="taskHelpText" type="xs:string" />

                                                                                                 <xs:element name="taskEstimatedDuration" type="xs:unsignedByte" />

                                                                                                 <xs:element name="taskType" type="xs:string" />

                                                                                                 <xs:element name="taskCost" type="xs:unsignedByte" />

                                                                                                 <xs:element name="taskPriority" type="xs:string" />

                                                                                         </xs:sequence>

                                                                                 </xs:complexType>

                                                                         </xs:element>

                                                                 </xs:sequence>

                                                         </xs:complexType>

                                                 </xs:element>

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                 </xs:sequence>

         </xs:complexType>

 </xs:element>

</xs:schema>

 

 

Output Parameters

A successful output response will just have a success message within the BizAgiWSResponse root node.

 

An output response in a failed invocation will include:

 

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.

 

 

Output Example

 

In the following example, we illustrate a returned XML-structured response from Bizagi's SOA layer when the invocation is successful:

Ws_assignactivity_responseexampleOK

 

When it is not, the following XML-structured response will be returned:

 

Ws_assignactivity_responseexampleERROR