Get Closed Activities

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Bizagi from external applications > Bizagi API > Alternative SOAP services > Available SOAP web services > WorkflowEngineSOA Web methods >

Get Closed Activities

Overview

This Web method is used to obtain closed activities in a Bizagi Process instance (finished work) from an external application.

Closed Activities in Bizagi Processes are those which are no longer in a pending status.

 

This method receives a single input having mainly: The identifier for the specific case (Process instance) and a number representing the hierarchical depth for which Bizagi should retrieve the information detail.

 

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

For the getClosedActivitiesAsString 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="idCase" type="xs:integer" minOccurs="0"/>

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

    </xs:sequence>

  </xs:complexType>

</xs:element>

</xs:schema>

 

Input Parameters

BizAgiWSParam: Root node.

idCase: Activities belonging to this idCase (case identification number).

subprocessDepth: It is an indicator of sub-process’s hierarchical depth.

This is used when a Sub-Process Task type exists, to be able to retrieve activities in possible sub-processes for a case. By default, the query returns one level of depth, that is to say, the result will contain the activities of Sub-Processes related to the Process of the actual case; but not the children sub-processes of a sub-processes. It can be any integer but is important to keep in mind that for greater depth the query response time will increment, so, it is better to enter a small number.

 

Input Example

With the following example, we will retrieve closed Activities for the Process instance having Case number 9201.

The information retrieved will go 2 levels deep.

We suggest you use How to start a process in Bizagi from other applications as a guideline to invoke this service.

 

GetClosedActivities Method Input

<BizAgiWSParam>

<idCase>9201</idCase>

<subprocessDepth>2</subprocessDepth>

</BizAgiWSParam>

 

GetClosedActivitiesAsString Method Input

<caseInfo>

 <![CDATA[<BizAgiWSParam>

   <idCase>9201</idCase>

   <subprocessDepth>2</subprocessDepth>

 </BizAgiWSParam>]]>

</caseInfo>

 

Output

 

Output Schema

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

 

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

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

<xs:element name="workItems">

  <xs:complexType>

    <xs:sequence>

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

    </xs:sequence>

  </xs:complexType>

</xs:element>

<xs:complexType name="workItemType">

  <xs:sequence>

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

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

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

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

    <xs:element name="workItemSubprocesses">

      <xs:complexType>

        <xs:sequence>

          <xs:element name="workItems" minOccurs="0">

            <xs:complexType>

              <xs:sequence>

                <xs:element name="workItem" type="workItemType" maxOccurs="unbounded"/>

              </xs:sequence>

            </xs:complexType>

          </xs:element>

        </xs:sequence>

      </xs:complexType>

    </xs:element>

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

    <xs:element name="workItemSolutionDate" type="xs:dateTime"/>

    <xs:element name="task">

      <xs:complexType>

        <xs:sequence>

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

          <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="HelpURL" type="xs:string"/>

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

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

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

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

          <xs:element name="taskTransactional" type="xs:boolean"/>

          <xs:element name="taskCompensation" type="xs:boolean"/>

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

          <xs:element name="AllowsReassign" type="xs:boolean"/>

          <xs:element name="SendNotification" type="xs:boolean"/>

          <xs:element name="SendAlarms" type="xs:boolean"/>

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

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

          <xs:element name="IsAsynchTask" type="xs:boolean"/>

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

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

          <xs:element name="ShowFeedback" type="xs:boolean"/>

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

        </xs:sequence>

      </xs:complexType>

    </xs:element>

    <xs:element name="process">

      <xs:complexType>

        <xs:sequence>

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

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

          <xs:element name="processCreationDate" type="xs:dateTime"/>

          <xs:element name="processSolutionDate" type="xs:dateTime"/>

          <xs:element name="processWorkflowClass">

            <xs:complexType>

              <xs:sequence>

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

                <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="workflowClassHelpURL" type="xs:string"/>

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

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

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

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

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

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

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

                <xs:element name="workflowClassSupportsScopes" type="xs:boolean"/>

              </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" type="xs:string"/>

              </xs:sequence>

            </xs:complexType>

          </xs:element>

        </xs:sequence>

      </xs:complexType>

    </xs:element>

  </xs:sequence>

</xs:complexType>

</xs:schema>

 

Output Parameters

workItems: This is the root node of the response; it contains a "workItem" node for each Activity included in the result.

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

workItemId: Identification number or key of the Activity.

workItemState: State in which the Activity is.

workItemEntryDate: Date and time when this Activity was reached.

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

workItemSubprocesses: If the Activity is of a Sub-Process type, this will contain information about the Sub-Process’s closed Activities. It has a "workItems" child node so from here on the structure is like this same response including a "workItem" node for each Activity matching the query in the Sub-Process.

workItemEstimatedSolutionDate: Is the Activity’s estimated solution date.

workItemSolutionDate: The actual date in which the Activity was completed.

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.

HelpUrl: URL with information of the Activity.

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.

taskTransactional: An indicator stating if a Task is transactional.

taskCompensation: States if this is a compensation Task.

taskTimerEventDuration: If this Task has an attached Timer Event, it will contain its duration in minutes.

AllowsReassign: A mark showing if this Task may be reassigned to another user.

SendNotification: Indicates if an email must be sent to a user informing of the availability of the Task.

SendAlarms: Indicates if an email must be sent to the assigned user informing that the Task is at risk of being overdue.

ExtendedEstimatedDuration: Estimated extended time duration.

Form: Reserved for future use.

IsAsynchTask: Specifies if this is an asynchronous Task or not. Usually used for interfaces.

NumberOfRetries: Applies to asynchronous Task. Is the number of automatic retries for the Task in case it fails (an exception is thrown).

RetryInterval: Applies to asynchronous Tasks. Is the time (in minutes) between each retry.

ShowFeedback: Applies to asynchronous Tasks. Indicates if the user will be informed when an error occurs.

TimeoutSeconds: Applies to asynchronous Tasks. Time (in seconds) the asynchronous Task will wait for the external system to respond.

process: Has information about the Process to which the Activity belongs.

processId: Identification number of the case (idCase).

processCreationDate: Case creation date.

processSolutionDate: Case solution date.

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 the web application.

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

workflowClassSupportScopes: Indicates if the Process supports long-term transactions in Bizagi (Scopes); which is an efficient method of data persistence.

processError: Contains information of errors occurring during the processing of this method.

errorCode: Code of the error, if one occurred.

errorMessage: Message of the error, if one occurred.

 

Output Example

In the following example, we illustrate a returned XML-structured sample response from Bizagi SOA layer:

 

GetClosedActivities Method Output

 

GetActivities_Image004R

GetClosedActivitiesAsString Method Output

 

getClosedActivitiesAsString_01

 

Related Web methods

To obtain a list with all pending Activities instead, use the getActivitiesAsString or getActivities web methods.

For more information, refer to the Get Activities article.


Last Updated 1/6/2022 5:13:50 PM