perfomActivityAsString

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

perfomActivityAsString

Overview

This Web method is used to execute a pending Activity (those found at the Inbox) from an external application.

In this way, the Activity is completed and that given case proceeds to the next stage in the workflow.

 

This method receives a single input having mainly: The information of the end user executing the Activity, the specific Process instance to be worked on (case number), the given Task name representing the pending Activity, and any business information relevant to that Activity (any data, attachments, etc).

Through this method, a pending Activity is completed, in the same way as it would be done at the Work Portal.

For further information about completing work from the Work Portal options, please refer to Bizagi Work Portal.

 

 

note_pin

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

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

For the performActivityAsString 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:

 

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

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

 <xs:element name="BizAgiWSParam">

         <xs:complexType>

                 <xs:sequence>

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

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

                         <xs:element name="ActivityData">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:choice>

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

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

                                                 </xs:choice>

                                                 <xs:choice>

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

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

                                                 </xs:choice>

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                         <xs:element name="Entities">

                                 <xs:complexType/>

                         </xs:element>

                 </xs:sequence>

         </xs:complexType>

 </xs:element>

</xs:schema>

 

Input Parameters

BizAgiWSParam: Root node, containing all the necessary information to execute the Activity.

domain: Here goes the name of the domain for the Bizagi user who will be register as performer of the executed Activity.

userName: Name of the user who will be register as performer of the executed Activity.

ActivityData: Contains all the necessary information to find an Activity.

idCase: Is the case identification number for the Activity which wants to be performed. It is required to include this element or the radNumber.

radNumber: An alternative to the idCase. It is the creation number (case number) of the case containing the pending Activity that wants to be continued. When the same creation number is used for several cases (like when a Sub_process uses its parent’s number) the idCase must be used to distinguish for which case the Activity belongs to.

taskId: It is the identification number for the Activity which wants to be executed. This element is necessary; if this number is not known then the taskName must be included.

taskName: Use as a complement or alternative to taskId, it is the name of the pending Activity which wants to be executed.

Entities: It is a node containing the values for the business data that is going to be set for the case.

For further information about the expected structured for the business information contained in this Entities element, refer to Bizagi's data model XML schemas.

 

 

Input Example

With the following sample XML, we will complete the Activity with Task name = Task3, for the case number having identifier = 9253.

PerformActivity_Image002

 

 

If you wish to follow a detailed business example using the performActivityAsString Web method, refer to how to perform an Activity in Bizagi from other applications.

 

 

Output

 

Output Schema

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

 

<?xml version="1.0" ?>

<xs:schema targetNamespace="http://tempuri.org/performActivity.xsd" xmlns="http://tempuri.org/performActivity.xsd"

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

 <xs:element name="processes">

         <xs:complexType>

                 <xs:sequence>

                         <xs:element name="process">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:element name="processId" type="xs:string" minOccurs="0" />

                                                 <xs:element name="processRadNumber" type="xs:string" minOccurs="0" />

                                                 <xs:element name="processWorkflowClass" minOccurs="0" maxOccurs="1">

                                                         <xs:complexType>

                                                                 <xs:sequence>

                                                                         <xs:element name="workflowClassId" type="xs:string" minOccurs="0" />

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

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

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

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

                                                                         <xs:element name="workflowClassDisplayOrder" type="xs:string" minOccurs="0" />

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

                                                                         <xs:element name="workflowClassGlobalForm" type="xs:string" minOccurs="0" />

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

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

                                                                         <xs:element name="workflowClassProcessForumType" type="xs:string" minOccurs="0" />

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

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

                                                                 </xs:sequence>

                                                         </xs:complexType>

                                                 </xs:element>

                                                 <xs:element name="processError" minOccurs="0" maxOccurs="1">

                                                         <xs:complexType>

                                                                 <xs:sequence>

                                                                         <xs:element name="errorCode" type="xs:string" minOccurs="0" nillable="true" />

                                                                         <xs:element name="errorMessage" type="xs:string" minOccurs="0" nillable="true" />

                                                                 </xs:sequence>

                                                         </xs:complexType>

                                                 </xs:element>

                                                 <xs:element name="CurrentWorkItems" minOccurs="0" maxOccurs="1">

                                                         <xs:complexType>

                                                                 <xs:sequence>

                                                                         <xs:element name="workItem" minOccurs="0" maxOccurs="unbounded">

                                                                                 <xs:complexType>

                                                                                         <xs:sequence>

                                                                                                 <xs:element name="workItemId" type="xs:string" minOccurs="0" />

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

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

                                                                                                 <xs:element name="workItemDuration" type="xs:string" minOccurs="0" />

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

                                                                                                 <xs:element name="task" minOccurs="0" maxOccurs="unbounded">

                                                                                                         <xs:complexType>

                                                                                                                 <xs:sequence>

                                                                                                                         <xs:element name="taskId" type="xs:string" minOccurs="0" />

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

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

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

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

                                                                                                                         <xs:element name="taskEstimatedDuration" type="xs:string" minOccurs="0" />

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

                                                                                                                         <xs:element name="taskCost" type="xs:string" minOccurs="0" />

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

                                                                                                                 </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:sequence>        

         </xs:complexType>                        

 </xs:element>

</xs:schema>

 

Output Parameters

processes: The root which will include N number of occurrences of Process, according to how many cases had their activities completed with this method (given that more than 1 case may use the same radNumber when using sub-processes).

process: This element includes information for the Process (for each invoked case).

processId: Identification number of the case (idCase).

processRadNumber: Alphanumeric value corresponding to the creation number of the case.

savedMessage: Reserved for future use.

Entities: Reserved for future use.

processWorkflowClass: The information in this node is all about the Process (Process metadata) not about the particular case.

workflowClassId: Identification number (or key) of the Process.

workflowClassName: Name of the Process.

workflowClassDisplayName: Display name of the Process.

workflowClassDescription: Process description.

workflowClassHelpText: Process help text.

workflowClassHelpURL: Help URL for the Process.

workflowClassDisplayOrder: The order in which the Process will be viewed in Bizagi Studio.

workflowClassCreationDate: Creation date of the Process.

workflowClassGlobalForm: Identification number of the Process’s global form (zero if it is not configured).

workflowClassAllocationPrinciple: Reserved for future use.

workflowClassProcessType: Process type.

workflowClassDisplay: Indicates whether the Process is visible or not.

workflowClassUseParentRadicationNumber: Indicates if a case of this Process uses its own creation number or the same number as the parent Process (if it is a Sub-process).

processError: If the process of performing the Activity is not successful, this element will contain information or the error.

errorCode: Code of the error that occurred, otherwise it will be empty.

errorMessage: Message of the error that occurred, otherwise it will be empty.

Path: XPath of the element, in the request XML, generating the error. Visible when the error is caused by wrong data.

Attrib: Is the name of the attribute in Bizagi where the saved operation was attempted. Visible when the error is caused by wrong data.

Value: Is the value which caused the error. Visible when the error is caused by wrong data.

ErrorMessage: Message explaining why the error occurred. Visible when the error is caused by wrong data.

CurrentWorkItems: The set of activities available for the case.

workItem: This is a specific Activity (an instance of a Task) of the Process that is active for the case.

workItemId: Identification number or key of the Activity.

workItemState: State in which the Activity is.

workItemEntryDate: Date and time when the case reached this Activity.

workItemDuration: Is the estimated duration, in minutes, for this Activity.

workItemEstimatedSolutionDate: Is the case’s estimated solution date.

Task: Contains information about Task corresponding to the Activity.

taskId: Identification number or key of the Task.

taskName: Name of the Task.

taskDisplayName: Display name of the Task.

taskDescription: Task’s descriptive text.

taskHelpText: Task’s help text.

taskEstimatedDuration: Is the estimated duration, in minutes, for the Task.

taskType: Type of Task.

taskCost: The estimated cost of the Task. This value, like the estimated dates, is configured and determined by the designer of the Process.

taskPriority: Fulfillment priority of the Task.

 

 

Output Example

In the following example, we illustrate a returned XML-structured response from Bizagi SOA layer, in which we can see the response of a successful invocation.

 

PerformActivity_Image004

 

 

Related Web methods

If you wish to trigger a business Event instead (set the occurrence of a BPMN Intermediate Event), use the setEventAsString or setEvent Web method.

For further information refer to the setEventAsString article.

 

To get a list of pending Activities for a certain case, use the getActivitiesAsString or getActivities Web method.

For further information refer to the getActivityAsString article.

 

If you wish to only input information for a pending Activity without completing it (simulate clicking on the Save button in a form, instead of the Next button), use the saveActivityAsString or saveActivity Web method.

For further information refer to the saveActivityAsString article.

 

If you wish to start a Process instead (a new case), use the createCasesAsString or createCases Web method.

For further information refer to the createCasesAsString article.